I'm making a tool with an Excel userform that has 4 frames, separate from each other with their own controls.
I would like to navigate back and fourth between frames.
When I initialize the Userform, I have the first frame (Frame_1) appear with it's controls. It's designed for the user to be able to tab through the controls or click if they choose. All the controls work fine. If the user wants to add their name to a list, I have them click on a control to bring up the second frame (Frame_2) and hide Frame_1. This also does what it's supposed to do.
The problem occurs when I want to navigate back to Frame_1 from Frame_2. I'm able to do this with Frame_2.Visible = False and Frame_1.Visible = True commands, but none of the controls behave on Frame_1 after this occurs. It would be ideal if Frame_1 with all it's controls would act the same as they do when the Userform is initialized. It seems like I need to be able to put focus on the first control in Frame_1 in order to do this. But when I write the code for this, I always get an error that states "Run-time error '-2147467259 (80004005)': Unspecified error"
If I remain within Frame_1 and go through all the controls and put focus on the first control after the last control has executed, I have no issues. This error only occurs when going back from Frame_2 to Frame_1
So I would like to know if this makes sense? Is this common? and Is there is a workable solution? I can't seem to find anything online.
Any help would be appreciated.