Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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
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
Dialogue Box Flat disgusted Excel Discussion (Misc queries) 2 May 20th 08 06:46 PM
Create list of unique instances from list of multiple Instances Dishon Excel Worksheet Functions 0 March 3rd 08 10:46 AM
pop up dialogue box Micayla Bergen New Users to Excel 1 June 23rd 06 02:34 AM
Dialogue Box Ed Excel Programming 0 February 10th 04 06:30 PM
Is there an easy way to replace list A instances with list B instances (sorted lists). kkip Excel Programming 3 December 31st 03 01:50 PM


All times are GMT +1. The time now is 08:23 PM.

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

About Us

"It's about Microsoft Excel"