+ Reply to Thread
Results 1 to 8 of 8

command button to move user to specific spot on different sheet

  1. #1
    Registered User
    Join Date
    02-01-2005
    Posts
    62

    Question 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

  2. #2
    Forum Contributor
    Join Date
    12-30-2005
    Location
    Mobile, AL
    Posts
    102

    This is what I have done.

    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




    Quote Originally Posted by grime
    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

  3. #3
    Registered User
    Join Date
    02-01-2005
    Posts
    62
    Here is my code:

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

    It gives me errors. Help!

  4. #4
    Forum Contributor
    Join Date
    12-30-2005
    Location
    Mobile, AL
    Posts
    102
    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.

    Quote Originally Posted by grime
    Here is my code:

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

    It gives me errors. Help!

  5. #5
    Registered User
    Join Date
    02-01-2005
    Posts
    62
    I've tried it both ways... the error I am getting is:

    Select method of Range class failed.

    I am also using version 2000

  6. #6
    Forum Contributor
    Join Date
    12-30-2005
    Location
    Mobile, AL
    Posts
    102
    Did you mannually enter the code, or did you record a macro to get the code?

  7. #7
    Registered User
    Join Date
    02-01-2005
    Posts
    62
    Manually entered it

  8. #8
    Forum Contributor
    Join Date
    12-30-2005
    Location
    Mobile, AL
    Posts
    102
    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1