OL 2003 VB Macro- How to close an open dialog box?
Posted on 2006-04-13
I have a macro that opens a dialog box with command buttons in it. Each button opens a child dialog box with txt boxes and when Go is clicked a new OLmessage window is suppose to open and be prefilled with the txt box info and HTML content from the code in the macro.
I say "suppose to" becuase it stops here with an error that basically says the initial dialog box called FrmChoose is still open.
How do I close this dialog after clicking one of the command buttons?
I tried several things, I thought me.hide would do it but it does not help. I don't understand modal and modeless, could it be the culprit?
Here is the code for FrmChoose
Private Sub CommandButton1_Click()
'Opens a new NFS form
Dim a As New NFS
Private Sub CommandButton2_Click()
'opens a new ACAT form
Dim b As New ACAT
Private Sub CommandButton3_Click()
'Opens a new IRA form
Dim c As New ira