DomesticedCrab
New Member
- Joined
- May 16, 2019
- Messages
- 7
Hi,
I have a Userform which opens as "vbModeless," it contains a series of buttons to open more Userforms that all open as "vbModeless." Very simple, but randomly some of the files will immediately close when selecting one of the buttons contained on the first opened form. If I remove the "vbModeless" the error goes away. Any thoughts?
Code to open first form:
Public Sub ControlsShow()
Controls.Show vbModeless
End Sub
Code to open second form (button hosted on first form):
Private Sub EnterPricing_Click()
PricingForm.Show vbModeless
Application.Calculation = xlAutomatic
End Sub
Nothing wild at all - but it will crash and crash. If I step through it, it functions fine and will no longer crash.
Could it be a form not unloading or something creating some rogue object??
Thank you
I have a Userform which opens as "vbModeless," it contains a series of buttons to open more Userforms that all open as "vbModeless." Very simple, but randomly some of the files will immediately close when selecting one of the buttons contained on the first opened form. If I remove the "vbModeless" the error goes away. Any thoughts?
Code to open first form:
Public Sub ControlsShow()
Controls.Show vbModeless
End Sub
Code to open second form (button hosted on first form):
Private Sub EnterPricing_Click()
PricingForm.Show vbModeless
Application.Calculation = xlAutomatic
End Sub
Nothing wild at all - but it will crash and crash. If I step through it, it functions fine and will no longer crash.
Could it be a form not unloading or something creating some rogue object??
Thank you