date doesn't get entered in cell

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
 
E

Excel-General

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top