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"