Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Lounger
    Join Date
    Jul 2005
    Location
    Bangkok, Bangkok Metropolis, Thailand
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Scrolling a Userform (XP 2003)

    Help

    How do you scroll down a Userform? I have information on a Userform that users can't see. Thanks

  2. #2
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Scrolling a Userform (XP 2003)

    <img src=/S/hello.gif border=0 alt=hello width=25 height=29> Peter

    OK you do not scroll the UserForm (UF), what you would do is make the UF big enough to display all the componets on it.

    What you can also do, and this is real neat, is to change the Height property via code, so that when the user gets to a certain control on the UF, it will trigger the height adjustment.

    Better design is to identify what controls can be groups, example: name, address, phone number as one group, Number of hours worked, number of vacation hours earned, hourly rate, as a second group, and so on. One you do that, and if you are using MS-Excel 97 and > you can use a Multipage control to have these groups on one page.

    Redesign your UF with this in mind, or post the UF and I and others will give you some ideas.

    Cordially

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Scrolling a Userform (XP 2003)

    A UserForm has a property ScrollBars. By default, this is set to 0 - frmScrollBarsNone. You can set it to (for example) 2 - frmScrollBarsVertical.

    However, it might be better to use a multipage control to organize the controls on the userform into logically related groups without needing a scroll bar.

  4. #4
    Lounger
    Join Date
    Jul 2005
    Location
    Bangkok, Bangkok Metropolis, Thailand
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scrolling a Userform (XP 2003)

    Thanks for the advise Wassim

    The idea of multipages is interesting. I've attached the code, but this is directly linked by macro to an Excel worksheet. If you need the worksheet let me know.

    One other thing. I loaded Adobe7 and lots of funny things started happening to my PC, so I uninstalled it. Now I get an error message whenever I open the Visual Basic Userform from Excel. 'Compile error in hidden module: AutoExecNew' and another error as I close Excel.

    Peter

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Scrolling a Userform (XP 2003)

    Some remnant of Adobe 7 (a notoriously badly-behaving app) may be left. See Jan Karel Pieterse's <!post=Systematic Approach to Behavioral Problems in XL,290455>Systematic Approach to Behavioral Problems in XL<!/post>.

  6. #6
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Scrolling a Userform (XP 2003)

    <img src=/S/hello.gif border=0 alt=hello width=25 height=29> Peter

    OK, I need the User Form. To export the UF, do the following while the UF is displayed in the VBE, Visual Basic Editor:

    1) From the File menu, choose Export File... or use CTRL+E
    2) The Export File dialog will display. Give your file a name, or go with the defualt name that Excel gives.
    3) Choose where you wnat to save the UF file, of extension .FRM, and add .TXT to the extnsion and press Save. This is so that the Lounge will allow you to post it.
    4) Attache this .FRM.txt file to your message. I will change the extension when I get it back to .FRM and use it.

    Thanks

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  7. #7
    Lounger
    Join Date
    Jul 2005
    Location
    Bangkok, Bangkok Metropolis, Thailand
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scrolling a Userform (XP 2003)

    Sorry this reply took so long

    Attached is the frm file.

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Scrolling a Userform (XP 2003)

    It won't work this way, Wassim's instructions were incomplete. There is also a .frx file corresponding to the .frm file. Either zip the .frm and .frx together, or zip the .xls file itself, and attach the zip file.

  9. #9
    Lounger
    Join Date
    Jul 2005
    Location
    Bangkok, Bangkok Metropolis, Thailand
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scrolling a Userform (XP 2003)

    Thanks for the tips for the Excel start up problem. For information, I deleted the files PDFMaker.old from the EXStart and the startup directories and the problem stopped.

  10. #10
    Lounger
    Join Date
    Jul 2005
    Location
    Bangkok, Bangkok Metropolis, Thailand
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scrolling a Userform (XP 2003)

    Okay

    I can't get the zipped frx file less than 116 kb so can't send it. The excel macro is linked to an Excel template file which is too big to send (1.4MB). So I've attached the xls file that it operates from.

    I'm not sure that you can find the form in all this mess. If you can't then maybe I have to unattach it from the xlt file somehow.

  11. #11
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Scrolling a Userform (XP 2003)

    I can't find a form in the file...

    Steve

  12. #12
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Scrolling a Userform (XP 2003)

    <img src=/S/sorry.gif border=0 alt=sorry width=15 height=15> Peter for the confusion

    What you can do is <font color=red>(MAKE BACKUP COPY OF WORKBOOK <font color=blue>FIRST</font color=blue>)</font color=red> then simply add one empty worksheet, and delete all the other worksheets leaving the empty worksheet.

    Keep the VDE stuff the way they are, and zip the workbook.

    Try the maximum zipping in Winip, or whatever zipping software you are using.

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  13. #13
    Lounger
    Join Date
    Jul 2005
    Location
    Bangkok, Bangkok Metropolis, Thailand
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scrolling a Userform (XP 2003)

    I guess I'm doing something wrong here. I opened the xls file, saved a copy. Deleted the sheet with the data leaving a blank worksheet (checked through Tools - Macro that my macro was still there and it worked OK, yes it did). Closed VB and saved the empty workbook, zipped the 1.4MB file using the Windows XP (right click) 'Send to.. Compressed (zipped) folder' which saved it as 1.2MB. Which of course is too big.

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Scrolling a Userform (XP 2003)

    If the exported .frx file is over 100 KB zipped, your workbook will be larger. But 116 KB for a zipped .frx file is HUGE! What does your form contain, in heaven's name? An image, or something like that?

  15. #15
    Lounger
    Join Date
    Jul 2005
    Location
    Bangkok, Bangkok Metropolis, Thailand
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scrolling a Userform (XP 2003)

    Well. You know Hans, funny you should mention that. Silly I forgot about the logo in about 10 places. It has now compressed to 96 KB and is attached. In the next mail I will send the new frm and frx files.

    Sorry to be such a dumbo.

    Peter

Page 1 of 2 12 LastLast

Posting Permissions

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