Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have this script to ask user for a start date which works perfectly:
---------------------------------------------------------------------------------------------------------------------- Sub StartDate() ActiveSheet.Unprotect 'place at the beginning of the code Dim vResponse As Variant Do vResponse = Application.InputBox( _ Prompt:="Enter the start date for this sheet that you need for the 2-week on, 2-week off, Par-A-Gon schedule:" & vbCrLf & vbCrLf & _ "(Excel is flexible; you can pretty much type any date format and it'll know what date you mean!)", _ Title:="Overtime Start Date", _ Default:=Format(Date, "mmm dd, yyyy"), _ Type:=2) If vResponse = False Then Exit Sub 'User cancelled Loop Until IsDate(vResponse) Range("A2").Value = Format(CDate(vResponse), "mmm dd, yyyy") ActiveSheet.Protect ' place at end of code End Sub ---------------------------------------------------------------------------------------------------------------------- What user input box would ask for dosage that could then be dumped into a protected cell with this custom format (to be dumped into protected cell E1): "''Dose'' = "@" tablets in a.m. & p.m." Thank you! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How get user input that can then be used in formula, as criteria? | Excel Worksheet Functions | |||
Have user input converted to uppercase in same cell as input? | New Users to Excel | |||
Can you put a formula on a field that requires user input? | Excel Programming | |||
How can I calculate user input from a combo box into a formula? | Excel Worksheet Functions | |||
User input formula variable | Excel Programming |