+ Reply to Thread
Results 1 to 2 of 2

Spinner Button to Scroll Document

  1. #1
    Registered User
    Join Date
    05-08-2010
    Location
    Virginia, United States
    MS-Off Ver
    Excel 2003
    Posts
    8

    Spinner Button to Scroll Document

    I'm trying to use this spinner button to scroll through a document to the left or right 7 cells at a time.

    I've tried the following code and others, but can't get it to work.
    Private Sub SpinButton1_Change()

    End Sub

    Private Sub SpinButton1_SpinDown()

    With Range("B2").Select = .Select + 7

    End With

    End Sub


    Private Sub SpinButton1_SpinUp()

    With Range("B2").Select = .Select + 7

    End Sub



    Thx in advance

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Spinner Button to Scroll Document

    I think you may be confused about how With works and what .Select means. You have also hard-coded your range; you don't want to move relative to B2, you want to move relative to wherever you are. Try this.

    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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