Small Bug


Posted by PHISHFN on July 08, 2001 9:42 AM

When I run this code it does fine until the end. It only shows frmBackdrop; frmStoreSetup stays hidden until I close frmBackdrop:

Private Sub cmdPreview_Click()
Application.WindowState = xlMaximized
Sheet12.Activate
frmStoreSetup.Hide
frmBackdrop.Hide
MsgBox "Click ""OK"" when finished...", , "Preview"
frmBackdrop.Show
frmStoreSetup.Show
End Sub

Thanks,

phishfn



Posted by Dax on July 08, 2001 2:38 PM

Hello,

When you show the first form, the code of that form takes over until it is closed. There are two ways you could get around this.

You could either include this procedure in the code module of frmBackdrop: -

Private Sub UserForm_Activate()
frmstoresetup.Show
End Sub

or you could just show the forms as modeless. I.e.

Private Sub cmdPreview_Click()
Application.WindowState = xlMaximized
Sheet12.Activate
frmstoresetup.Hide
frmbackdrop.Hide
MsgBox "Click ""OK"" when finished...", , "Preview"
frmbackdrop.Show vbModeless
frmstoresetup.Show vbModeless
End Sub

HTH,
Dax.