PDA

View Full Version : Using Forms in Word



MWE
03-25-2006, 11:58 AM
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?

lucas
03-25-2006, 01:58 PM
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.

TonyJollans
03-25-2006, 05:21 PM
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.

MWE
03-25-2006, 05:28 PM
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 :banghead:

MWE
03-25-2006, 05:57 PM
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
Dim cntl as Control
For each cntl in Me
MsgBox cntl.Name
Next cntl
I got a compile error that the object did not support the particular method :dunno

fumei
03-26-2006, 03:04 AM
Uh....Me means nothing to the instruction. Me is the whole shebang, not just the Controls Collection.

Try:Dim cntl As Control
For Each cntl In Me.Controls
MsgBox cntl.Name
Next cntlIt 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.

MWE
03-31-2006, 07:04 AM
Uh....Me means nothing to the instruction. Me is the whole shebang, not just the Controls Collection.

Try:Dim cntl As Control
For Each cntl In Me.Controls
MsgBox cntl.Name
Next cntlIt 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 ...)

fumei
03-31-2006, 08:32 AM
:rotlaugh: