View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Michel Pierron Michel Pierron is offline
external usenet poster
 
Posts: 214
Default Modal/Modeless Forms

Hi kirkm,
You must use conditional compilation:

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

MP

"kirkm" a écrit dans le message de
news: ...
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