Stuck stuck stuck.
All i'm trying to do is, on opening excel I want a textbox to display whatever date is in the dtpicker next to it.
Private Sub WorkBook_Open()
Dim objOLE As Object
For Each objOLE In Sheets("Theatres Checklist").OLEObjects
If TypeName(objOLE.Object) = "DTPicker" Then
objOLE.Object.Value = Date
End If
Next objOLE
End Sub
thats the code i use to set the correct date in the dtpicker on opening excel but the textbox displays whatever date was in there last time the workbook was saved.
Any help would be appreciated.
All i'm trying to do is, on opening excel I want a textbox to display whatever date is in the dtpicker next to it.
Private Sub WorkBook_Open()
Dim objOLE As Object
For Each objOLE In Sheets("Theatres Checklist").OLEObjects
If TypeName(objOLE.Object) = "DTPicker" Then
objOLE.Object.Value = Date
End If
Next objOLE
End Sub
thats the code i use to set the correct date in the dtpicker on opening excel but the textbox displays whatever date was in there last time the workbook was saved.
Any help would be appreciated.