Consulting

Results 1 to 8 of 8

Thread: Using Forms in Word

  1. #1
    VBAX Expert
    Joined
    Feb 2005
    Posts
    929
    Location

    Using Forms in Word

    I am running Word2000 and WinXP. I have created and used userforms in Excel and other tools for years. I am having a great deal of trouble using userforms in Word. They seem to be far less robust than in Excel and are constantly doing things they should not. The most irritating is the "disappearing control" problem. While in the VBA Editor working on a form, the control being added or modified will disappear. It has not been deleted because if I try to add a control with the same name as the one that disappeared, I get an error message. Once this "disappearing act" happens, any controls added to any userforms in that global template are not "available" (the Me object does not understand that it now has an additional control) until I exit the template and reboot the system. Then any previously added controls are available. I thought this was a corrupted Normal.dot problem, but it is in every global template suggesting that it is a fundamental problem with the VBA editor or the instance of it in Word.

    Has anyone had similar problems? Is there any way a control can be hidden from view while in the VBA editor?
    "It's not just the due date that's important, it's also the do date" [MWE]

    When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.

  2. #2
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Hi Mark,
    I don't use Word or forms in word much but I have never experienced the problem you describe. Several different OS and Versions of Word over time. Office 2003-WinXP right now.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  3. #3
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    I have never experienced this either - at least not the disappearing controls. Sometimes names can remain unavailable after objects have been deleted until Word has been closed and reopened - off the top of my head I'm not sure if that applies to userform controls.

    From various other problems you have reported here over the past week or three it really does sound like something in your Word setup is corrupt.
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  4. #4
    VBAX Expert
    Joined
    Feb 2005
    Posts
    929
    Location
    Quote Originally Posted by TonyJollans
    I have never experienced this either - at least not the disappearing controls. Sometimes names can remain unavailable after objects have been deleted until Word has been closed and reopened - off the top of my head I'm not sure if that applies to userform controls.

    From various other problems you have reported here over the past week or three it really does sound like something in your Word setup is corrupt.
    and the scary part is that I have reported on a fraction of the problems I have encountered
    "It's not just the due date that's important, it's also the do date" [MWE]

    When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.

  5. #5
    VBAX Expert
    Joined
    Feb 2005
    Posts
    929
    Location
    Quote Originally Posted by TonyJollans
    I have never experienced this either - at least not the disappearing controls. Sometimes names can remain unavailable after objects have been deleted until Word has been closed and reopened - off the top of my head I'm not sure if that applies to userform controls.

    From various other problems you have reported here over the past week or three it really does sound like something in your Word setup is corrupt.
    I tried to extracted the name of controls used for a particular userform and received an error. The code was inserted into the userform code module and ran when a particular button was clicked. The code is[vba]
    Dim cntl as Control
    For each cntl in Me
    MsgBox cntl.Name
    Next cntl
    [/vba] I got a compile error that the object did not support the particular method
    "It's not just the due date that's important, it's also the do date" [MWE]

    When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.

  6. #6
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    Uh....Me means nothing to the instruction. Me is the whole shebang, not just the Controls Collection.

    Try:[vba]Dim cntl As Control
    For Each cntl In Me.Controls
    MsgBox cntl.Name
    Next cntl[/vba]It helps to actually point to properties.

    As for your disappearing controls. I have been using userforms in Word ever since you COULD use userforms. I have used literally hundreds of them. I have never had them disappear as you describe. There is something very funky going on in your install of Word. VERY funky.

  7. #7
    VBAX Expert
    Joined
    Feb 2005
    Posts
    929
    Location
    Quote Originally Posted by fumei
    Uh....Me means nothing to the instruction. Me is the whole shebang, not just the Controls Collection.

    Try:[vba]Dim cntl As Control
    For Each cntl In Me.Controls
    MsgBox cntl.Name
    Next cntl[/vba]It helps to actually point to properties.

    As for your disappearing controls. I have been using userforms in Word ever since you COULD use userforms. I have used literally hundreds of them. I have never had them disappear as you describe. There is something very funky going on in your install of Word. VERY funky.
    thanks for this reply. It is amazing how as problems arise, particularly when sane people should be in bed and asleep, one's ability to think clearly often suffers (that assumes, of course, that one had some initial ability ...)
    "It's not just the due date that's important, it's also the do date" [MWE]

    When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.

  8. #8
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location

Posting Permissions

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