Userform Multipage

dellehurley

Board Regular
Joined
Sep 26, 2009
Messages
171
Office Version
  1. 365
Platform
  1. Windows
Hi
I have googled my heart out but cannot find the answer to this.

How do I refer to a combo-box in a user-form if there are 2 pages in a multipage?
I tried
VBA Code:
MultiPage1.Pages("page1").Me.cmdAddName2.Enabled = True
MultiPage1.Pages("page2").Me.cmdFullName3.Enabled = True
and
VBA Code:
Dim Pg1 As Long
Dim Pg2 As Long

Pg1 = FrmForm.MultiPage1.Value = 0
Pg2 = FrmForm.MultiPage1.Value = 1

    If Me.txtRecords.Value = 1 Then
        Pg1.Me.cmdFullName2.Enabled = False
        Pg1.Me.txtRIN2.Enabled = False
        Pg1.Me.cmdAddName2.Enabled = False
neither work. Any ideas?
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hi,
you have the Me keyword in wrong place

VBA Code:
Me.MultiPage1.Pages("page1").cmdAddName2.Enabled = True
Me.MultiPage1.Pages("page2").cmdFullName3.Enabled = True

where Me is the UserForm

Dave
 
Upvote 0
Thanks Dave. Your my saviour once again.
Initially I thought your change did not work..... hours later I realised I also had a typo ie. cmd instead of cmb :rolleyes:

Dannielle
 
Upvote 0
Happy to help - glad issue resolved

Dave
 
Upvote 0

Forum statistics

Threads
1,214,915
Messages
6,122,212
Members
449,074
Latest member
cancansova

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top