Adding multipages,pages'labels, checkboxes to Userform

  • Thread starter Stephen English
  • Start date
S

Stephen English

I have successfully added a multipage to a form and then added a page to it but when I try to add a label, it puts it on the main form not the multipage and it won't add a checkbox at al
I hope you can give me some clue
Regard
Stephen Englis

Dim mp As MultiPag
Dim pg As pag
Dim lblClause As Labe
Dim cbone As CheckBo

Set mp = Me.Controls.Add("Forms.MultiPage.1", "mpage", True
With m
.Height = 15
.Top = 23
.Width = 51
.Left = 1

Set pg = .Pages.Add("lblclause999"
With p
Set lblClause = Me.Controls.Add("Forms.Label.1", "lblClause"
With lblClaus
.Top = 30
.Width = 5
.Caption = "working
End With
End Wit
End Wit
 
P

Peter Hewett

Hi Stephen English

Change the following statement:
Set lblClause = Me.Controls.Add("Forms.Label.1", "lblClause")

to:
Set lblClause = pg.Controls.Add("Forms.Label.1", "lblClause")

HTH + Cheers - Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top