View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default UserForm doesn't show?

Charlotte E. explained :
Why doesn't this work:

Dim MyUF As UserForm
Set MyUF = UserForm1
MyUF.Show

???


How to set a userform as a variable???


CE


A UserForm doesn't have a Show method (according to the ObjectLib).

An Object Set to a UserForm does have a Show method.

Example:
Dim MyUF As Object
Set MyUF = UserForm1
MyUF.Show

However, why not just...

UserForm1.Show
...so you don't have the overhead of storing a ref to it in a variable?

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc