ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   command button to move user to specific spot on different sheet (https://www.excelbanter.com/excel-programming/350347-command-button-move-user-specific-spot-different-sheet.html)

grime[_9_]

command button to move user to specific spot on different sheet
 

First sheet on my worksheet contains a protected instruction page.
Have a "help" commandbutton at the bottom of each subsequent page.

I would like, when the commandbutton is pressed, to take the user to
the specific portion of the instruction page. Basically:

when the help button is pressed on sheet 2, it takes the user to sheet
1 with row 15 at "the top"
when the help button is pressed on sheet 3, it takes the user to sheet
1 with row 37 at "the top"
when the help button is pressed on sheet 4, it takes the user to sheet
1 with row 59 at "the top"
and so on...

sheet 1 is protected, so i cannot (or can i?) select specific cells...

any help is much appreciated


--
grime
------------------------------------------------------------------------
grime's Profile: http://www.excelforum.com/member.php...o&userid=19227
View this thread: http://www.excelforum.com/showthread...hreadid=501072


Amber_D_Laws[_13_]

command button to move user to specific spot on different sheet
 

Grime,

I also have an instruction sheet as the first sheet in the module I am
working on. This is what I used to jump from sheet to sheet.

Sheets("How-To").Select
Range("A1").Select

Of course you would use whatever cell is the "top" for each "Page" of
your help sheet, and as far as I have experienced, you can select a
cell if you (locked or unlocked) if you set up the protection that way.
I am not familiar with all versions of Excel, and I know that older
versions don't allow as many protection options. I am using Excel 2000,
and with that version when you pull up the protect sheet window there is
a list underneath where you can supply a password, and the first two
options are for selecting locked and unlocked cells. All you have to do
is make sure these are checked (which they are by default) and hey
presto bango, it should work fine.

Since Excel 2000 chooses the select both unlocked and locked cells as
default, I think that this is also true for older versions as well, but
to be honest I really don't know.

I hope this helped some.
Amber:)




grime Wrote:
First sheet on my worksheet contains a protected instruction page.
Have a "help" commandbutton at the bottom of each subsequent page.

I would like, when the commandbutton is pressed, to take the user to
the specific portion of the instruction page. Basically:

when the help button is pressed on sheet 2, it takes the user to sheet
1 with row 15 at "the top"
when the help button is pressed on sheet 3, it takes the user to sheet
1 with row 37 at "the top"
when the help button is pressed on sheet 4, it takes the user to sheet
1 with row 59 at "the top"
and so on...

sheet 1 is protected, so i cannot (or can i?) select specific cells...

any help is much appreciated



--
Amber_D_Laws
------------------------------------------------------------------------
Amber_D_Laws's Profile: http://www.excelforum.com/member.php...o&userid=30012
View this thread: http://www.excelforum.com/showthread...hreadid=501072


grime[_10_]

command button to move user to specific spot on different sheet
 

Here is my code:

Private Sub CommandButton1_Click()
Worksheets("Instructions").Range("B9").Select
End Sub

It gives me errors. Help!


--
grime
------------------------------------------------------------------------
grime's Profile: http://www.excelforum.com/member.php...o&userid=19227
View this thread: http://www.excelforum.com/showthread...hreadid=501072


Amber_D_Laws[_16_]

command button to move user to specific spot on different sheet
 

Exactly what error is it giving you? And have you tried seperating the
two selections into two seperate lines...ie:

Private Sub CommandButton1_Click()
Worksheets("Instructions").Select
Range("B9").Select
End Sub

To be quite honest without knowing more, I don't think I can offer any
other suggestions.

Don't lose hope though. Dan Patterson helped me with one of these
little tricky things that took a week, but in the end, we got it to
work. :)

grime Wrote:
Here is my code:

Private Sub CommandButton1_Click()
Worksheets("Instructions").Range("B9").Select
End Sub

It gives me errors. Help!



--
Amber_D_Laws
------------------------------------------------------------------------
Amber_D_Laws's Profile: http://www.excelforum.com/member.php...o&userid=30012
View this thread: http://www.excelforum.com/showthread...hreadid=501072


grime[_11_]

command button to move user to specific spot on different sheet
 

I've tried it both ways... the error I am getting is:

Select method of Range class failed.

I am also using version 2000


--
grime
------------------------------------------------------------------------
grime's Profile: http://www.excelforum.com/member.php...o&userid=19227
View this thread: http://www.excelforum.com/showthread...hreadid=501072


Amber_D_Laws[_18_]

command button to move user to specific spot on different sheet
 

Did you mannually enter the code, or did you record a macro to get the
code?


--
Amber_D_Laws
------------------------------------------------------------------------
Amber_D_Laws's Profile: http://www.excelforum.com/member.php...o&userid=30012
View this thread: http://www.excelforum.com/showthread...hreadid=501072


grime[_12_]

command button to move user to specific spot on different sheet
 

Manually entered it


--
grime
------------------------------------------------------------------------
grime's Profile: http://www.excelforum.com/member.php...o&userid=19227
View this thread: http://www.excelforum.com/showthread...hreadid=501072


Amber_D_Laws[_20_]

command button to move user to specific spot on different sheet
 

Sorry Grime,
I wish I had some other advice, but I will step back from this one, and
let someone who really knows what they are talking about handle it. I am
dealing with the same sort of problem right now, and not really being a
programmer, I don't know what your next recourse is.
Amber


--
Amber_D_Laws
------------------------------------------------------------------------
Amber_D_Laws's Profile: http://www.excelforum.com/member.php...o&userid=30012
View this thread: http://www.excelforum.com/showthread...hreadid=501072



All times are GMT +1. The time now is 07:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com