Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How can I write a macro that asks for and read a user supplied date?
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You could use an InputBox. There are 2 different ones , one is from excel
(Application.ImputBox) , the other one is from vba (InputBox). The first one is , i believe, more interesting as you tell what kind of value you ask for : Sub test() Dim res As String res = Application.InputBox("Select a range", "My Input", , , , , , 2) 'above, the last param 2 means we ask for a String If res = "False" Then Exit Sub 'user clicked cancel 'else continue to process MsgBox "you have entered: " & res End Sub Check the online help to get more input on how to use it (ask the user to select a range, to enter a number, ...) Regards, Sebastien "jerry chapman" wrote: How can I write a macro that asks for and read a user supplied date? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Range("B5").Formula = InputBox("Enter Date")
works for me. "jerry chapman" wrote in message .. . How can I write a macro that asks for and read a user supplied date? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
run macro with input msg based on cell input | Excel Discussion (Misc queries) | |||
Input Box within a macro | Excel Discussion (Misc queries) | |||
Macro Data Input | Excel Discussion (Misc queries) | |||
input box within macro | Excel Worksheet Functions | |||
pause for input during macro | Excel Programming |