Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    3 Star Lounger siflaar's Avatar
    Join Date
    Jan 2001
    Location
    Amersfoort, Netherlands
    Posts
    203
    Thanks
    4
    Thanked 0 Times in 0 Posts

    WD97 - more than 25 items in a dropdown list

    Is it posible to have more than 25 items in a Word Dropdown list field?
    Greetings,

    Patrick Schouten
    (The Netherlands)

  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: WD97 - more than 25 items in a dropdown list

    No- not as far as I know.

    What you can do instead is to have a text form field with a macro on exit- that macro displays a userform with all of your choices. It's probably nicer anyway- you have to scroll down a large dropdown box; on a userform you can show things very nicely, and make it look very professional. It can impress the heck out of your users!
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  3. #3
    3 Star Lounger siflaar's Avatar
    Join Date
    Jan 2001
    Location
    Amersfoort, Netherlands
    Posts
    203
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: WD97 - more than 25 items in a dropdown list

    Could you explane how I must do that?
    Greetings,

    Patrick Schouten
    (The Netherlands)

  4. #4
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: WD97 - more than 25 items in a dropdown list

    I can't explain and expect that Geoff can.

    (A couple of bars from "The Twilight Zone" theme here.[img]/w3timages/icons/smile.gif[/img]) You are about to enter a world of untold power over Microsoft Word - the world of the UserForm and VBA!

    You may want to download the following and take a look at them.
    http://www.addbalance.com/word/download/AskForm.zip and
    http://www.addbalance.com/word/download/UserForm.zip.
    (These are both designed as tutorials with the VBA unlocked.)

    http://www.mvps.org/word/FAQs/Userfo...eAUserForm.htm
    http://www.mvps.org/word/FAQs/index5.html VBA FAQ
    http://www.mvps.org/word/FAQs/index10.html UserForms FAQ

    Hope this helps,
    Charles Kyle Kenyon
    Madison, Wisconsin

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

    Re: WD97 - more than 25 items in a dropdown list

    Patrick,

    I'm not sure whether it's the Userform you need help with or attaching a macro. I'll attack the second, come back if you need help with the first:

    .Write your macro - eg:
    sub showForm
    myForm.show
    End Sub

    .Insert your text form field
    .Double click on it
    .Click on the "Run macro on exit" down arrow. "showForm" will be on the list. Select it.
    .Protect the document
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  6. #6
    3 Star Lounger siflaar's Avatar
    Join Date
    Jan 2001
    Location
    Amersfoort, Netherlands
    Posts
    203
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: WD97 - more than 25 items in a dropdown list

    Thanks,
    I will have a look, and let you know if it worked.
    Greetings,

    Patrick Schouten
    (The Netherlands)

  7. #7
    3 Star Lounger siflaar's Avatar
    Join Date
    Jan 2001
    Location
    Amersfoort, Netherlands
    Posts
    203
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: WD97 - Thanks

    Thank you all.
    I now see the problem clearly and understand that using UserForms is much more flexible than the word form options.
    Greetings,

    Patrick Schouten
    (The Netherlands)

  8. #8
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: WD97 - more than 25 items in a dropdown list

    Hi Geoff:

    Could you explain what you mean by a userform (as opposed to a form field) & how you'd display more than 25 lines?

    Thanks,

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

    Re: WD97 - more than 25 items in a dropdown list

    Phil,

    I'va attached a VERY rough sample of what I mean.

    The module whiich displays the userform is initiated by the "OnExit" macro from form field "Text2"
    Attached Files Attached Files
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  10. #10
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: WD97 - more than 25 items in a dropdown list

    Hi,

    Another strategy worth mentioning, when you need to display a really long list in a listbox on a userform, is to break the list into more than one piece, and provide option buttons that permit the user to indicate which part of the list they want to see.

  11. #11
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: WD97 - more than 25 items in a dropdown list

    Thanks, Geoff. Another area I need to learn about. It seemed to me that there was no On Exit macro. The code that you used showed the userform upon entry into the Text2 bookmark and did so behind the scenes...i.e. nothing was checked in the property box of any of the form fields.

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

    Re: WD97 - more than 25 items in a dropdown list

    Phil,

    There's no On Exit- the form processing populated Text2 from within the form, and then gave focus to Text3.

    There is an "On Entry" macro on Text2. Double clicking on Text2 (while the form is unprotected) *should* show the macro name in the "Macro on Entry" box.

    Using userforms in this way can add all sorts of flexibility to a form, and allow things to be done which would be much more awkward or complicated than just using form fields.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  13. #13
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: WD97 - more than 25 items in a dropdown list

    Hi Geoff:

    Thanks for the explanation. I would have expected an OnEntry macro as the userform pops up as soon as you enter the field. However, it's strange. When I look at properties (or double click the field), the "Run macro on" entry or exit is blank. Yet if I scroll in the "Entry" field & put a blank there & click OK, the userform is then disabled. What macro should be listed in the "Entry" box? Is it listed when you look at the Text2 properties?

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

    Re: WD97 - more than 25 items in a dropdown list

    Phil,

    It's strange- I can see "main" listed on the "Run macro on entry" (and I'm on a different computer than before.

    It may be that you have another "main" available somewhere- and that I should have used a more unique name? And that when you click on Text2, it can't resolve which one?

    I've noticed before that at times when it doesn't whow something there, it seems to still keep the value. If I have a routine in "On Entry", then delete the macro to which it refers, it shows as blank; however, if I add the macro in again, the name reappears.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  15. #15
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: WD97 - more than 25 items in a dropdown list

    Hi Geoff:

    That might be it--I have an AutoExec.Main & AutoOpen.Main that was put there by an add-in (it's a bookmark toolbutton by Prime Consulting). I can't view the code, of course, but you think that would cause it? What I'll do is experiment by renaming the Main macro to almost anything else & then put that as an OnEntry macro for text2. Anyway, it's very interesting. Someday, when I get off these boards for awhile, I'll have to read a VBA book.

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
  •