Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default User Guided Button???


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.

I've been experimenting and have the following code in VB. It brings u
an input box but then whenever I enter anything and click OK, an erro
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 Su

--
locutus24
-----------------------------------------------------------------------
locutus243's Profile: http://www.excelforum.com/member.php...fo&userid=1286
View this thread: http://www.excelforum.com/showthread.php?threadid=48342

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default User Guided Button???

Hello"

The statement
Worksheets("Pub").Activate
tries to activate a worksheet called "Pub", which most likely doesn't exist

Just omit the quotation marks:
Worksheets(Pub).Activate

Herbert

"locutus243" wrote:


Hi guys,

I have 100 worksheets all with different names and a main menu. From
the main menu I want to be able to press a button that opens an input
box in which I can type the name of the worksheet I want to go to and
then a macro will take me to that worksheet.

I've been experimenting 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=483423


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default User Guided Button???


Hey,

Thanks for taking a stab at trying to help me, I really appreciate it


I took out the quotation marks but when I enter my worksheet name i
the inputbox it still throws an error message at me.

I have 100 worksheets each title is a 2 or three digit number (i.e
351, 54). I want to be able to type my number in and then it'll go t
that worksheet. I don't understand why its not working, the code seem
alright to me (until the error msg appears). But I have very littl
knowledge of VB..

Thanks

Mar

--
locutus24
-----------------------------------------------------------------------
locutus243's Profile: http://www.excelforum.com/member.php...fo&userid=1286
View this thread: http://www.excelforum.com/showthread.php?threadid=48342

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default User Guided Button???

See response in excel.misc

--

HTH

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


"locutus243" wrote
in message ...

Hey,

Thanks for taking a stab at trying to help me, I really appreciate it.


I took out the quotation marks but when I enter my worksheet name in
the inputbox it still throws an error message at me.

I have 100 worksheets each title is a 2 or three digit number (i.e.
351, 54). I want to be able to type my number in and then it'll go to
that worksheet. I don't understand why its not working, the code seems
alright to me (until the error msg appears). But I have very little
knowledge of VB..

Thanks

Mark


--
locutus243
------------------------------------------------------------------------
locutus243's Profile:

http://www.excelforum.com/member.php...o&userid=12862
View this thread: http://www.excelforum.com/showthread...hreadid=483423



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
Excel users! Do-It-Yourself Dashboards, Reports, Guided Analytics and Business Presentations! Johnny[_3_] Charts and Charting in Excel 4 February 27th 08 09:27 AM
Excel users! Do-It-Yourself Dashboards, Reports, Guided Analytics and Business Presentations! Don Guillett Excel Discussion (Misc queries) 3 February 27th 08 09:27 AM
User guided button??? locutus243 Excel Discussion (Misc queries) 5 November 9th 05 12:20 PM
use a button to open a user form? Hru48 Excel Discussion (Misc queries) 1 September 1st 05 07:41 PM
User name button access. sungen99[_23_] Excel Programming 2 August 4th 05 09:15 PM


All times are GMT +1. The time now is 10:47 AM.

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"