View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gixxer_J_97[_2_] Gixxer_J_97[_2_] is offline
external usenet poster
 
Posts: 206
Default proper way to create a userform

Hi all,

just wondering what the 'correct' way to initialize and dispose of a
userform is.

presently i am doing something like this:

private sub UserForm_Initialize()
' clear contents of combo boxes, label captions, etc
' set up initial values of the above
end sub

public sub init(optional arg as variant)
UserForm_Initialize
'any other code to run here / sub calls
MyForm.show
end sub

private sub myButton_clicked()
MyForm.hide
end sub

and externally (from another module)

MyForm.init()


is there a better (more correct) way to do this?

tia

J