It works here.
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Bob Phillips" wrote in message
...
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)
"locutus243"
wrote
in message ...
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
--
locutus243
------------------------------------------------------------------------
locutus243's Profile:
http://www.excelforum.com/member.php...o&userid=12862
View this thread:
http://www.excelforum.com/showthread...hreadid=483414