Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dialogue Box to populate several instances
Morning,
I would very much like a dialogue box to pop up and prompt the user to insert a three digit number so as to populate cell A1 and the Worksheet with the letter 'X' and the three digit code entered. Any easy ideas? Thanks Solomon |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dialogue Box to populate several instances
Solomon, try something like this
Range("A1").Value = "x " & InputBox("Enter Your 3 digit number", _ "Enter Number") -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "solomon_monkey" wrote in message ups.com... Morning, I would very much like a dialogue box to pop up and prompt the user to insert a three digit number so as to populate cell A1 and the Worksheet with the letter 'X' and the three digit code entered. Any easy ideas? Thanks Solomon |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dialogue Box to populate several instances
Not really sure what exactly you want to populate or what multiple
instances you are talking about. However below example, should give you an idea how to achieve what you want to achieve: Where to put this code? Well you did not mention when you want the dialgoue box to pop up. Try it in Workbook_Open event. Sharad Dim resp As String, ShExists As Boolean, Sh As Worksheet Getnum: resp = InputBox("Please enter a 3 digit number (Integer Only)") If Len(resp) = 0 Then Exit Sub If Not IsNumeric(resp) Then MsgBox "Please enter an Integer!", vbCritical, "Data type error" GoTo Getnum: End If If InStr(1, resp, ".") 0 Or InStr(1, resp, ",") 0 Then MsgBox "Integer Only please! No decimal point or commas", _ vbCritical, "Data type error" GoTo Getnum: End If If Len(resp) < 3 Then MsgBox "The number MUST BE THREE DIGITS!", vbCritical, "Digits error" GoTo Getnum End If ShExists = False For Each Sh In ThisWorkbook.Worksheets If Sh.Name = "X" & resp Then ShExists = True End If Next Sh If Not ShExists Then MsgBox "There is no sheet in this workbook relating to the number you entered." _ & Chr(13) & "Please try with different number", vbCritical, "Sheet Not Found" GoTo Getnum: End If Worksheets("X" & resp).Range("A1").Value = "Whatever value you want to put" *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dialogue Box to populate several instances
M orning Solomon,
Do val = InputBox("Supply 3 digit number") fOK = val = "" Or (IsNumeric(val) And val 0 And val < 1000) If fOK And val < "" Then Range("A1").Value = val Loop Until fOK -- HTH RP (remove nothere from the email address if mailing direct) "solomon_monkey" wrote in message ups.com... Morning, I would very much like a dialogue box to pop up and prompt the user to insert a three digit number so as to populate cell A1 and the Worksheet with the letter 'X' and the three digit code entered. Any easy ideas? Thanks Solomon |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Dialogue Box | Excel Discussion (Misc queries) | |||
Create list of unique instances from list of multiple Instances | Excel Worksheet Functions | |||
pop up dialogue box | New Users to Excel | |||
Dialogue Box | Excel Programming | |||
Is there an easy way to replace list A instances with list B instances (sorted lists). | Excel Programming |