Results 1 to 6 of 6
  1. #1
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    adding scroll bars to form (excel 97/2000)

    How can I add scroll bars to a form such that when they're clicked the fields below a certain area become visible?

    I've read the threads on using the scrollbar control but can't get it working and I've read the Excel help but still don't get it <img src=/S/crybaby.gif border=0 alt=crybaby width=15 height=15>

    I have a large form with lots of items and it's too long for people to use on a laptop screen so I want to add a scroll bar so they can page up/dn through the items. I've tried adding the scrollbar control but can't figure out how to set it up such that it displays the items. If my form is 9" long do I shrink it to 5" (for example) and then somehow set the scroll bars so that they magically display the bottom 4"?

    I also tried putting a frame control around all the fields in the form and can get the scroll bars to show but still can't figure out how to get them to display out of view items. Can someone provide a sample for me to look at? Pretty Plz?

    I attached my big form with most of the text fields edited (since I can't show you what company I'm writing this for) but it's still big enough to demonstrate what I have).

    Signed, Clueless Deb <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>
    Attached Files Attached Files

  2. #2
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: adding scroll bars to form (excel 97/2000)

    Instead of a scroll bar, what about something along the lines of:<pre>Private Sub Frame1_Enter()
    Me.Top = 0
    End Sub

    Private Sub Frame2_Enter()
    Me.Top = -100
    End Sub

    Private Sub Frame3_Enter()
    Me.Top = -200
    End Sub</pre>


    Alternatively, split the form and make it something like a wizard.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  3. #3
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: adding scroll bars to form (excel 97/2000)

    Thanks for the idea with the Frames but it still means that the frames are visible to the user so that they can click the frame (or tab into one of its fields). I enhanced your suggestion with equivalent _Exit() code to put the frames back where they were but when I showed it to one of the users they balked at how it looked when the frames jumping around the page.

    As to using a wizard that won't work (I've done one with the MultiPage control before) since they want to see all the data at once and a wizard only exposes certain pieces (plus it's not trivial code to do the previous/next buttons).

    I'm still hoping for the missing link to how to add scroll bars to a form (or a frame).

    Thnx, Deb <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  4. #4
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: adding scroll bars to form (excel 97/2000)

    OK, next suggestion.

    You could add the posititioning of the form dependant on each textbox instead of each frame. It would cut down on the jumping around a lot, if you wanted to go that way.

    Sorry, thinking laterally, as I don't think the form designed in that way will work well, even with a scroll bar (assuming you could get that to work). You would still have to have jumping around, as you indicated you would like to have things repositioned automatically as you went through the form.

    You've got a "tall" form, and narrow. You want it to be seen in its entirety. A wizard is no good.

    Can you just make it wide and not as tall? If it's twice as wide- but followed sequentially top to bottom for one set of data, then started at the top for "column 2". Might that work?

    I feel that it's a "design solution" you need- not the "techincal solution" which might not work at all.

    BTW, you do have a lot of vertical white space (at my resolution). You may just be able to compress together to fit everyting on one screen.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  5. #5
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: adding scroll bars to form (excel 97/2000)

    Hi Deb,
    See attached. It's true the Excel help isn't exactly clear! You need to set the height of your form to the height you want visible, then set the scrollheight to the total height you want the scrollbars to be able to scroll through. For your form, I set the form height to 300 and the scroll height to 650. You can adjust as necessary.
    Hope that helps.
    Attached Files Attached Files
    Regards,
    Rory

    Microsoft MVP - Excel

  6. #6
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: adding scroll bars to form (excel 97/2000)

    <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23> <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23> <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23> This is great! I knew it was simple but couldn't get my mind thinking correctly! I spent the weekend working on a redesign in case I couldn't get the scroll bars working now I can give them what they wanted.

    Whew, this is a good way to start Monday (after losing a whole hour yesterday, it's amazing how one stinking hour can seem like an entire day lost).

    Thnx, Deb <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

Posting Permissions

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