User guided button???

L

locutus243

Hi guys,

I have 100 worksheets all with different names and a main menu. Fro
the main menu I want to be able to press a button that opens an inpu
box in which I can type the name of the worksheet I want to go to an
then a macro will take me to that worksheet.
Is this possible, I've been looking for a way but am relatively rubbis
with Excel. Any help would be greatly appreciated...

Thanks for your time

Mar
 
L

locutus243

Hey guys,

I've been experimenting since my post and have the following code in
VB. It brings up an input box but then whenever I enter anything and
click OK, an error message appears. Could anyone give me a hand???

Thanks

Mark

Heres my code:-

Sub RoundToZero()
Worksheets("Main Page").Activate
On Error GoTo PressedCancel
Set Pub = Application.inputbox( _
prompt:="Enter your EKR Pubn Code", _
Type:=0)
Worksheets("Pub").Activate

Exit Sub

PressedCancel:
Resume
End Sub
 
B

Bob Phillips

Sub RoundToZero()
Dim Pub
Worksheets("Main Page").Activate
On Error GoTo PressedCancel
Pub = InputBox( _
prompt:="Enter your EKR Pubn Code")
Worksheets(Pub).Activate

Exit Sub
PressedCancel:
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
L

locutus243

Hey,

Thanks for your help. I tried your script but it said that there was
wrong number of arguments or invalid property assignments on the 'Pub
input( _' line.

What does this mean??

Thanks

Mar
 
B

Bob Phillips

It works here.

--

HTH

RP
(remove nothere from the email address if mailing direct)


Bob Phillips said:
Sub RoundToZero()
Dim Pub
Worksheets("Main Page").Activate
On Error GoTo PressedCancel
Pub = InputBox( _
prompt:="Enter your EKR Pubn Code")
Worksheets(Pub).Activate

Exit Sub
PressedCancel:
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


in message news:[email protected]...
 
B

Bryan Hessey

Bob's code works for me also if I change 'Main Page' to Sheet1 and repl
Sheet2 to the prompt
 
Top