shennricks
New Member
- Joined
- Apr 1, 2022
- Messages
- 9
- Office Version
- 365
- Platform
- Windows
I'm trying to create code that adds a combobox to a multipage on a userform. I've tried copied examples I am seeing online but getting an error:
Dim newTextBox
Dim MyPage
Dim MultiPage1
Set MyPage = Item.GetInspector.ModifiedFormPages("P.2")
Set MultiPage1 = MyPage.MultiPage1
Set newTextBox = MultiPage1.Pages("Chamber 1").Controls.Add("Forms.TextBox.1", 1)
When I get to the 'Set MyPage line I'm getting an error saying that variable is not found for 'Item'. Not seeing in the examples where this is supposed to be defined. I'm not entirely sure what is going on with this piece of code.
Dim newTextBox
Dim MyPage
Dim MultiPage1
Set MyPage = Item.GetInspector.ModifiedFormPages("P.2")
Set MultiPage1 = MyPage.MultiPage1
Set newTextBox = MultiPage1.Pages("Chamber 1").Controls.Add("Forms.TextBox.1", 1)
When I get to the 'Set MyPage line I'm getting an error saying that variable is not found for 'Item'. Not seeing in the examples where this is supposed to be defined. I'm not entirely sure what is going on with this piece of code.