View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
David Myle David Myle is offline
external usenet poster
 
Posts: 11
Default Creating Userform Controls on Frame

Hi all,

How can I create "on the fly" other controls on a Frame, if the frame itself
is to be created on the fly. The following code (simplified to create a
CheckBox on a Frame) failed.

Private Sub Userform_Initialize()
Dim x as Control, y as Control
Set x = Me.Controls.Add("Forms.Frame1.1")
Set y = Me..Frame1.Controls.Add("Forms.CheckBox1.1")
End Sub

The code balks at "Frame1" with "Method or data member not found" error
message. Apparently, the code fails to detect the Frame purported to have
been created earlier.

Any help will be appreciated.