Modal/Modeless Forms

  • Thread starter Thread starter kirkm
  • Start date Start date
K

kirkm

Is there any way to have a form modeless in Excel 2002
but model in Excel 97.

I was playing with this

If Val(Application.Version) = 8 Then
frmLabel.Show
Else: frmLabel.Show vbModeless
End If

but the Else clause causes an error in Excel 97 (which
I can't trap out).

Thanks - Kirk
 
Hi kirkm,
You must use conditional compilation:

#If VBA6 Then
frmLabel.Show
#Else
frmLabel.Show vbModeless
#End If

MP
 
The correct procedure is the reverse:

#If VBA6 Then
frmLabel.Show vbModeless
#Else
frmLabel.Show
#End If

MP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top