Hello everyone,
Can anyone help me with the following problem?
I would like to add an extra button to a module, with the go to today function, is that possible?
The code in the module is now:
and looks like this:
So I would like to have a 'Today' button to the left of the 'OK' button if possible
Thanks for the help
Can anyone help me with the following problem?
I would like to add an extra button to a module, with the go to today function, is that possible?
The code in the module is now:
VBA Code:
Sub gotodate()
Dim tt As Long
Dim TheString As String, TheDate As Date
TheString = Application.InputBox("Enter A Date ##/##/2024 format")
If TheString = False Then Exit Sub
If IsDate(TheString) Then
TheDate = DateValue(TheString)
Else
MsgBox "Invalid date enter ##/##/2024 format"
Exit Sub
End If
Inarr = Range(Cells(11, 1), Cells(11, 750))
tt = TheDate
For i = 1 To 750
If tt = Inarr(1, i) Then
Cells(11, i).Select
Exit For
End If
Next i
End Sub
So I would like to have a 'Today' button to the left of the 'OK' button if possible
Thanks for the help