Sharid
Well-known Member
- Joined
- Apr 22, 2007
- Messages
- 1,064
- Office Version
- 2016
- Platform
- Windows
In the past I have used this to disable multipage pages while a code is running. This only leave the active PAGE active and disables all the other pages until the process is finished, This prevents the user from navigating to other pages on a Multipage. I have now replaced the Multipage with a tab strip and was trying to do the same. However I can not get it to work.
I keep getting an Run type Error 13 Type Mismatch on the first line of code. I tried this
And
VBA Code:
Private Sub CommandButton1_Click()
InActivePagesEnabled(MultiPage1) = False ' disable tabs on multipage1
Application.Run "StaffDetails.UpdateRecords" ' runs this code from module
InActivePagesEnabled(MultiPage1) = True 'enable tabs on multipage1
End Sub
I keep getting an Run type Error 13 Type Mismatch on the first line of code. I tried this
VBA Code:
Private Sub CommandButton1_Click()
InActivePagesEnabled(TabStrip1) = False ' disable tabs on multipage1
Application.Run "StaffDetails.UpdateRecords" ' runs this code from module
InActivePagesEnabled(TabStrip1) = True 'enable tabs on multipage1
End Sub
And
VBA Code:
Private Sub CommandButton1_Click()
InActivePagesEnabled(UserForm1.TabStrip1) = False ' disable tabs on multipage1
Application.Run "StaffDetails.UpdateRecords" ' runs this code from module
InActivePagesEnabled(UserForm1.TabStrip1) = True 'enable tabs on multipage1
End Sub