Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 156
Default Modal/Modeless Forms

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 214
Default Modal/Modeless Forms

The correct procedure is the reverse:

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

MP

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





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 156
Default Modal/Modeless Forms

On Sun, 22 Oct 2006 10:03:55 +0200, "Michel Pierron"
wrote:

The correct procedure is the reverse:

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



Many thanks Michael,
That worked spot-on.

Cheers - Kirk
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Forms-Can i set the modal property? dpt[_6_] Excel Programming 3 August 9th 05 04:39 AM
How to make values of spreadsheet show in a modeless forms text bo Chirs Excel Programming 3 June 11th 05 01:50 PM
Forms that are modal in 97 are not modal in 2003 Old Car Excel Discussion (Misc queries) 1 April 27th 05 08:25 AM
Forms that are modal in 97 are not modal in 2003 Old Car Excel Programming 1 April 27th 05 08:25 AM
Modal Forms MJRay Excel Programming 1 March 8th 05 05:09 PM


All times are GMT +1. The time now is 09:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"