LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default User input into cell formula?

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How get user input that can then be used in formula, as criteria? jcoelho Excel Worksheet Functions 2 July 1st 08 04:58 AM
Have user input converted to uppercase in same cell as input? Shannonn New Users to Excel 1 June 20th 06 03:19 AM
Can you put a formula on a field that requires user input? Nan Excel Programming 2 February 15th 06 07:06 PM
How can I calculate user input from a combo box into a formula? Quizboy Excel Worksheet Functions 0 November 16th 05 06:11 PM
User input formula variable Petr Excel Programming 3 December 9th 04 01:59 PM


All times are GMT +1. The time now is 06:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"