I Found a simple programming for userforms to show depending on their Name, I would like to use the same idea for frames within a userform but I cannot figure out how.
This is what I found for the userform and it works fine.
Option Explicit
Function Form(Name As String) As Object
Set Form = CallByName(UserForms, "Add", VbMethod, Name)
End Function
Sub Test()
Dim strFormName As String
strFormName = "Userform" ' <-- replace by your lookup code instead
Form(strFormName).Visible = True
End Sub
Bookmarks