Hello -
I have been working trying to get a marco to accept a date from users.
However everytime I run this, sDefault returns today's date.
I do believe there is a calendar built in, is that a better way of getting dates? If so, is there a way I could lock the date down to a Friday? If so, how do I call this calendar, lock it to only friday (if possible), and place the date in a variable called sDefault?
thanks in advance.
Dim ws As Worksheet, PMSheet As String, OrgSheet As String
Dim sUserName As String
Dim sPrompt As String
Dim sTitle As String
Dim sDefault As Date
' Get Date
sPrompt = "Enter Date"
sTitle = "Date"
sDefault = Date
sUserName = InputBox(sPrompt, sTitle, sDefault)
'Always returns today.
MsgBox sDefault
I have been working trying to get a marco to accept a date from users.
However everytime I run this, sDefault returns today's date.
I do believe there is a calendar built in, is that a better way of getting dates? If so, is there a way I could lock the date down to a Friday? If so, how do I call this calendar, lock it to only friday (if possible), and place the date in a variable called sDefault?
thanks in advance.
Dim ws As Worksheet, PMSheet As String, OrgSheet As String
Dim sUserName As String
Dim sPrompt As String
Dim sTitle As String
Dim sDefault As Date
' Get Date
sPrompt = "Enter Date"
sTitle = "Date"
sDefault = Date
sUserName = InputBox(sPrompt, sTitle, sDefault)
'Always returns today.
MsgBox sDefault