Results 1 to 11 of 11

Thread: Moving scrollbar up and down on form [RESOLVED]

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2005
    Posts
    49

    Resolved Moving scrollbar up and down on form [RESOLVED]

    Hi,

    I have placed a vertical scrollbar on my userform but when i run the form - the scrollbar appears but i am unable to move the scrollbar up and down to view the form? I thought this would be done easily...but...not really
    Last edited by chaos7; Jun 15th, 2005 at 10:08 PM. Reason: no longer needed an answer

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Moving scrollbar up and down on form

    scroll bars are not easy in vb, (i have never used one in vba)
    in vb you have to write all the code to set the scale the scrollbar will move the form by, both clicking on the up and down arrows and clicking in bar for page moves.

    try a google search on scrollbar vba, it will give a lot of hits

    pete

  3. #3

    Thread Starter
    Member
    Join Date
    Apr 2005
    Posts
    49

    Re: Moving scrollbar up and down on form

    oh damn!! and i thought that it was something relatively easy.

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Moving scrollbar up and down on form

    i believe it would probably be harder than saving settings

    pete

  5. #5

    Thread Starter
    Member
    Join Date
    Apr 2005
    Posts
    49

    Re: Moving scrollbar up and down on form

    Oh God!! Didn't think it was that bad - already having problems with the temp save. I'm giving myself till tomorrow if i cant get temp saving and scrollbar working im jus going to leave it as is. Hate programming!!

  6. #6
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Moving scrollbar up and down on form

    post your whole project (document or spreadsheet) and i will try to have a look at it to help you out a bit (not do the whole thing for you though)

    pete

  7. #7

    Thread Starter
    Member
    Join Date
    Apr 2005
    Posts
    49

    Re: Moving scrollbar up and down on form

    no thats okay i am nearly done...just need to figure out how to work the scrollbar and save the temperature and light sensor settings...if i dont get it done i'll just hand in what i have.

  8. #8
    Frenzied Member
    Join Date
    May 2004
    Location
    Carlisle, PA
    Posts
    1,045

    Re: Moving scrollbar up and down on form

    Chaos:

    Here's a way to force the View of an Excel Window to a particular cell:
    Code:
    'Select the Top Left cell before leaving and scroll the window
    'This is the VERBOSE form of the command:
    Application.GoTo Reference:=Range("A88"), Scroll:=True
    
    'This is the TERSE form of the exact same command:
    Application.GoTo Range("A88"), True
    Of course the Ranged cell can be specified in the programmable syntax: Range(Cells(irow, icol))

    Good Luck and Good Learning!
    Last edited by Webtest; Jun 14th, 2005 at 07:32 AM. Reason: Excel
    Blessings in abundance,
    All the Best,
    & ENJOY!

    Art . . . . Carlisle, PA . . USA

  9. #9

    Thread Starter
    Member
    Join Date
    Apr 2005
    Posts
    49

    Re: Moving scrollbar up and down on form

    Ahh..thanks Webtest but in using Word never used Excel. I think i may have found a work around though - didnt realise what a pain scrollbars were

  10. #10
    Frenzied Member
    Join Date
    May 2004
    Location
    Carlisle, PA
    Posts
    1,045

    Re: Moving scrollbar up and down on form

    On a whim, I looked up "GoTo" in the Word VBA Help Heap ... here are a few examples from that information that move the insert cursor:
    Code:
        'Jumps to the 4th line of the document (Absolute)
        Selection.GoTo What:=wdGoToLine, Which:=wdGoToAbsolute, Count:=4
        'Jumps ahead 20 lines in the document (Relative)
        Selection.GoTo What:=wdGoToLine, Which:=wdGoToRelative, Count:=20
        'Jumps back 6 lines in the document (Previous)
        Selection.GoTo What:=wdGoToLine, Which:=wdGoToPrevious, Count:=6
    Good Luck and Good Learning.
    Blessings in abundance,
    All the Best,
    & ENJOY!

    Art . . . . Carlisle, PA . . USA

  11. #11

    Thread Starter
    Member
    Join Date
    Apr 2005
    Posts
    49

    Re: Moving scrollbar up and down on form [RESOLVED]

    Thanks Webtest for ur help but i've eliminated the use of scrollbar from my program.

Posting Permissions

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



Click Here to Expand Forum to Full Width