View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.userforms
Howard Kaikow Howard Kaikow is offline
external usenet poster
 
Posts: 269
Default Passing Userform as an argument to a procedure

In order to access the Caption of a Userform, I am passing the Userform as
an argument to a procedure.

If I pass the Userform as an Object, then the code works as intended. If I
pass the Userform as an MSForms.Userform, the code does not work properly.
I've seen the same behavior in both Excel and Word (Office 97, 2000, and
2002, not yet tested in Office 2003).

In one case, the caption is treated as an empty string.

In the other case, the caption is displayed in the "body" of the Userform
rather than in the title bar.


See Passing Userform as an argument to a procedure (Excel and Word) at
http://www.standards.com/OhMyWord/VBABugsFeatures.html

--
http://www.standards.com/; See Howard Kaikow's web site.