delaneyjm
Well-known Member
- Joined
- Apr 22, 2009
- Messages
- 624
Hello Everyone,
Wondering if I can get a quick resolution to this one. I'm currently running a few VBA macros and userforms that are running pretty flawlessly except for one part. I'm receiving a run-time error (specifically, error code 400: form already displayed. can't show modally) when one someone clicks a Yes button on one form.
Here is the code for each of the userforms.
That form calls all the macros and they run fine without issue. Problem occurs when the macros finish executing and another userform asks if they want to run the macros again with a different file. If they click a No button, no issue. Click Yes, and it causes the run-time error. Code for that userform is below
Any ideas? I thought that an Unload command did just that and was not actively running that particular form.
Running Excel 2007 in an XP Professional environment.
Wondering if I can get a quick resolution to this one. I'm currently running a few VBA macros and userforms that are running pretty flawlessly except for one part. I'm receiving a run-time error (specifically, error code 400: form already displayed. can't show modally) when one someone clicks a Yes button on one form.
Here is the code for each of the userforms.
Code:
Option Explicit
Private Sub btnSubmit_Click()
Dim strFile As String
strFile = txtBatchID.Text
Call BenefactorReceipts(strFile)
Unload frmBenReceipts
End Sub
Code:
Option Explicit
Private Sub btnNo_Click()
Unload frmCompRecs
End Sub
Private Sub btnYes_Click()
frmBenReceipts.Show
End Sub
Running Excel 2007 in an XP Professional environment.