Message to input Date in a cell

F

Fernando G,

I am working with a macro that perform some calculations but the last set of
calculation are base on a certain date; How can I insert in the middle of
the macro a message to input a Date, let's say "Input Date" and this should
be inserted in "O1".

Thanks
 
J

JE McGimpsey

One way:

Dim vResult As Variant
Do
vResult = Application.InputBox( _
Prompt:="Input date:", _
Title:="your title here", _
Type:=2, _
Default:=Date)
If vResult = False Then Exit Sub 'user cancelled
Loop Until IsDate(vResult)
ActiveSheet.Range("O1").Value = vResult
 

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