The following macro allows the user to enter "date" (e.g. 07/02/04) into cell h29, via an input box, which works perfectly fine
However I expected to be able to use the same general code to get a text entry instead of a date entry, but it won't let me
I want to enter text as the response, (e.g. BILL SMITH), but can't seem to get the syntax right. What do I change ???
Sub ENTERCURRENTYEAR()
'
End Sub
'
' Macro23 Macro
'
'
Sub Using_InputBox_Method()
Dim Response As Date
' Run the Input Box.
Response = Application.InputBox("Enter current Year start date (dd/mm/yy)", _
"FRIDAY REPORT", , 250, 300, "", , 1)
' Check to see if Cancel was pressed.
If Response <> False Then
' If not, write the number to the first cell in the first sheet.
Worksheets(1).Range("h29").Value = Response
End If
End Sub
Any hints appreciated
However I expected to be able to use the same general code to get a text entry instead of a date entry, but it won't let me
I want to enter text as the response, (e.g. BILL SMITH), but can't seem to get the syntax right. What do I change ???
Sub ENTERCURRENTYEAR()
'
End Sub
'
' Macro23 Macro
'
'
Sub Using_InputBox_Method()
Dim Response As Date
' Run the Input Box.
Response = Application.InputBox("Enter current Year start date (dd/mm/yy)", _
"FRIDAY REPORT", , 250, 300, "", , 1)
' Check to see if Cancel was pressed.
If Response <> False Then
' If not, write the number to the first cell in the first sheet.
Worksheets(1).Range("h29").Value = Response
End If
End Sub
Any hints appreciated