Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help modify simple existing code??
I've been using the following code to bring up 2 input boxes, 1 afte
the other, to allow the user to enter data into cells i'v pre-determined. Range("g3").Value = InputBox("Enter Your Initials") Range("h3").Value = InputBox("Enter Today's Date") However, in an ideal world (or an ideal forum!) I'd like only one inpu box to pop up with two fields, initials and date, instead of the two a at present. Can anyone help please? Many thank -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help modify simple existing code??
How about
Range("g3").Value = InputBox("Enter Your Initials") Range("h3").Value = InputBox("Enter Today's Date") Range("g3").Value = InputBox("Enter Your Initials in TWO letter format") Range("h3") = date -- Don Guillett SalesAid Software "ali" wrote in message ... I've been using the following code to bring up 2 input boxes, 1 after the other, to allow the user to enter data into cells i've pre-determined. Range("g3").Value = InputBox("Enter Your Initials") Range("h3").Value = InputBox("Enter Today's Date") However, in an ideal world (or an ideal forum!) I'd like only one input box to pop up with two fields, initials and date, instead of the two as at present. Can anyone help please? Many thanks --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help modify simple existing code??
If you really want to use an InputBox, then you could ask the user to
separate the initials and todays date with a delimiter of some sort. eg semi-colon. If you think that at some point in the future you may be asking for more than those two entries, you may want to create a userform. "ali" wrote in message ... I've been using the following code to bring up 2 input boxes, 1 after the other, to allow the user to enter data into cells i've pre-determined. Range("g3").Value = InputBox("Enter Your Initials") Range("h3").Value = InputBox("Enter Today's Date") However, in an ideal world (or an ideal forum!) I'd like only one input box to pop up with two fields, initials and date, instead of the two as at present. Can anyone help please? Many thanks --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help modify simple existing code??
Create your custom Input form. Insert 2 textboxes and 2 labels and 2 buttons (OK, CANCEL). Label1.Caption = "Enter Your Initials" TextBox1.Text = "" Label2.Caption = "Enter Today's Date" TextBox2.Text = Format(Date,"mmmm, dd yyyy") Private Sub CmdOK_Click() If Me.TextBox1 = "" Or Me.TextBox2 = "" Then MsgBox "I need all data", vbExclamation, "Info..." Exit Sub End if With ThisWorkbook.Worksheets("Name") .Range("g3").Value = Me.TextBox1 .Range("h3").Value = Me.TextBox2 End with Unload Me End Sub Private Sub CmdCancel_Click() Unload Me End Sub -----Original Message----- I've been using the following code to bring up 2 input boxes, 1 after the other, to allow the user to enter data into cells i've pre-determined. Range("g3").Value = InputBox("Enter Your Initials") Range("h3").Value = InputBox("Enter Today's Date") However, in an ideal world (or an ideal forum!) I'd like only one input box to pop up with two fields, initials and date, instead of the two as at present. Can anyone help please? Many thanks --- Message posted from http://www.ExcelForum.com/ . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help modify simple existing code??
Thanks guys, an input box sounds like the way i want to go but i've
never created one of those before - would any of you be willing to talk(type!) me through the way to create one with reference to what i want to create - preferably explaining things in idiot proof english along the way? Once again your help is much appreciated --- Message posted from http://www.ExcelForum.com/ |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help modify simple existing code??
Your OP said that "i am using the following code". I made a suggestion to
modify to suit your question. What is it you don't know how to do? -- Don Guillett SalesAid Software "ali" wrote in message ... Thanks guys, an input box sounds like the way i want to go but i've never created one of those before - would any of you be willing to talk(type!) me through the way to create one with reference to what i want to create - preferably explaining things in idiot proof english along the way? Once again your help is much appreciated --- Message posted from http://www.ExcelForum.com/ |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help modify simple existing code??
Don,
Many apologies, i am clearly suffering from very tired eye syndrome and messed up when i first tried your way. Thanks for taking the time to help --- Message posted from http://www.ExcelForum.com/ |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help modify simple existing code??
glad to help. Get some sleep now. New years eve coming up.
-- Don Guillett SalesAid Software "ali" wrote in message ... Don, Many apologies, i am clearly suffering from very tired eye syndrome and messed up when i first tried your way. Thanks for taking the time to help --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help!! To modify existing formula | Excel Discussion (Misc queries) | |||
Modify the existing formula | New Users to Excel | |||
How do I delete or modify an existing drop down list? | Excel Discussion (Misc queries) | |||
Modify an existing Cell formula using VBA | Excel Discussion (Misc queries) | |||
How do I modify an existing worksheet to remove columns & contents | Excel Discussion (Misc queries) |