LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Bryan Hessey
 
Posts: n/a
Default User guided button???


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


Bob Phillips Wrote:
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





--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=483414

 
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
Command Button on User form for Printing Anthony Slater Excel Discussion (Misc queries) 2 September 7th 05 02:01 PM
use a button to open a user form? Hru48 Excel Discussion (Misc queries) 1 September 1st 05 07:41 PM
Open an Outlook folder when a user clicks on a command button ... Rob Keel Excel Discussion (Misc queries) 2 August 1st 05 08:23 AM
Attaching a particular user defined function to cust button Ajay Excel Discussion (Misc queries) 3 February 23rd 05 08:29 AM
A "previous" button on a user form Anthony Slater Excel Discussion (Misc queries) 3 November 29th 04 05:57 PM


All times are GMT +1. The time now is 11:45 PM.

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

About Us

"It's about Microsoft Excel"