date doesn't get entered in cell

  • Thread starter Thread starter Excel-General
  • Start date Start date
E

Excel-General

I give up, why is the "inputDate" variable not getting put in the "v5"
cell?
In "a4" cell the "f_FnameLname" variable is getting entered just fine.
Also, is there a way to format the date so that in the dialog box the
user will have to enter a date?

tia,
Public Sub SingleMonths()
'months macro rewritten
'used for a single patient sheet to be printed
Dim inputDate As Date
Dim i As Long

inputDate = InputBox("Enter a date:", "Date", Date)
'requires date input from the user in a dialog box


For i = 2 To Worksheets.Count

Sheets(i).Range("v5") = "#" & inputDate & "#"
Sheets(i).Range("A4") = UserForm1.g_fNameLName
Next i

End Sub
 
sorry, It appears the problem was a locked cell and the format as a
date also.
answer. It works in the cell above it. Thanks anyway.
 
Back
Top