AndyLitch's blog
Response 2 to Need help to gather staff times
Submitted by AndyLitch on 20 November, 2012 - 10:10Martin,
two files attached. MD master is the file which collates the data from the timesheets. TS1 is a timesheet. Note I have amended the timesheet format slightly so this will need to become your new template timesheet (see notes).
I recommend you error check for mathematical errors before deploying.
The master workbook also has a populateallrnd macro which will populate all timesheet workbooks within a folder with random numbers.
Any probs/questions email me at andrewlitchfield@gmail.com for fine tweaking
Calculating Binomial Coefficients with Excel
Submitted by AndyLitch on 18 November, 2012 - 12:00Attached is a simple spreadsheet for calculating linear and binomial coefficients using Excel
Getting the hard drive serial number
Submitted by AndyLitch on 17 November, 2012 - 10:36Function HdNum() As String
Dim fsObj As Object
Dim drv As Object
Set fsObj = CreateObject("Scripting.FileSystemObject")
Set drv = fsObj.Drives("C")
HdNum = Hex(drv.serialnumber)
End Function
Sub HD()
MsgBox HdNum
End Sub
Since each computers hdd serial number is unique this can be useful for security
Demo Scrolling Message display using a chart
Submitted by AndyLitch on 17 November, 2012 - 09:49Just a bit of fun to demo how you can create a scrolling dot matrix message display using a bit of VBA and charts.
Sub DotMatrix()
Dim lngIndex As Long
ColourNum = 3
ColourSelect
DispState = Sheet2.CheckBox1.Value
Sheet2.CheckBox1.Value = True
Sheet2.Range("C58").Value = 1
'Exit Sub
With Worksheets("LCD")
For lngIndex = 0 To (Len(.Range("DISPLAYTEXT").Value) * 6) Step 1
.Range("SLICE").Value = lngIndex
Range("C2").Select
DoEvents
Next
Recent comments
5 years 42 weeks ago
6 years 28 weeks ago
6 years 40 weeks ago
6 years 42 weeks ago
6 years 43 weeks ago
6 years 49 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago