Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Versioning Question
Is there a way to use a VBA feature in Excel 2000 when running in Excel
2000, but have the system not us it when running in Excel 97? I've created a modeless dialog box for my application. I want it to run in Excel 2000 (and it does) but when I try to run the app in Excel 97 I get a compile error because Excel 97 does not accept the vbModeless parameter after the Form.Show command. I've tried containing it in a If statment, but that doesn't solve the problem. Is there anything equivalent to the precompiler statements in C that I can use here? Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Versioning Question
ExcelMan,
Have you tried If Application.Version 8 Then UserForm1.Show vbModeless Else UserForm1.Show End If -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "ExcelMan" wrote in message ... Is there a way to use a VBA feature in Excel 2000 when running in Excel 2000, but have the system not us it when running in Excel 97? I've created a modeless dialog box for my application. I want it to run in Excel 2000 (and it does) but when I try to run the app in Excel 97 I get a compile error because Excel 97 does not accept the vbModeless parameter after the Form.Show command. I've tried containing it in a If statment, but that doesn't solve the problem. Is there anything equivalent to the precompiler statements in C that I can use here? Thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Versioning Question
Hi Bob
It errs on 97 because vbModeless is unknown. The trick is to place that into an isolated sub that won't be called in 97: Sub Main() Select Case Val(Application.Version) Case 8 UserForm1.Show Case 9 To 99 Call Modeles Case Else End Select End Sub Private Sub Modeles() UserForm1.Show vbModeless End Sub -- HTH. Best wishes Harald Excel MVP Followup to newsgroup only please. "Bob Phillips" wrote in message ... ExcelMan, Have you tried If Application.Version 8 Then UserForm1.Show vbModeless Else UserForm1.Show End If -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "ExcelMan" wrote in message ... Is there a way to use a VBA feature in Excel 2000 when running in Excel 2000, but have the system not us it when running in Excel 97? I've created a modeless dialog box for my application. I want it to run in Excel 2000 (and it does) but when I try to run the app in Excel 97 I get a compile error because Excel 97 does not accept the vbModeless parameter after the Form.Show command. I've tried containing it in a If statment, but that doesn't solve the problem. Is there anything equivalent to the precompiler statements in C that I can use here? Thanks. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Versioning Question
Harald,
Thanks for showing me that. I don't have 97 on this machine to test, and although what you say is obvious (once someone tells you that is <vbg), I just strung together logical code. Ain't that always the way, logical code doesn't always work. I guess that is why we spend so much on testing! Regards Bob "Harald Staff" wrote in message ... Hi Bob It errs on 97 because vbModeless is unknown. The trick is to place that into an isolated sub that won't be called in 97: Sub Main() Select Case Val(Application.Version) Case 8 UserForm1.Show Case 9 To 99 Call Modeles Case Else End Select End Sub Private Sub Modeles() UserForm1.Show vbModeless End Sub -- HTH. Best wishes Harald Excel MVP Followup to newsgroup only please. "Bob Phillips" wrote in message ... ExcelMan, Have you tried If Application.Version 8 Then UserForm1.Show vbModeless Else UserForm1.Show End If -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "ExcelMan" wrote in message ... Is there a way to use a VBA feature in Excel 2000 when running in Excel 2000, but have the system not us it when running in Excel 97? I've created a modeless dialog box for my application. I want it to run in Excel 2000 (and it does) but when I try to run the app in Excel 97 I get a compile error because Excel 97 does not accept the vbModeless parameter after the Form.Show command. I've tried containing it in a If statment, but that doesn't solve the problem. Is there anything equivalent to the precompiler statements in C that I can use here? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 Macro/VB Question DDE Question | Excel Worksheet Functions | |||
Creative Ways to use Versioning or Tracking in Excel | Excel Discussion (Misc queries) | |||
Versioning in Excel | Excel Discussion (Misc queries) | |||
How do I avoid saving multiple Excel/Wordfiles for versioning purp | Excel Discussion (Misc queries) | |||
How do I avoid saving multiple data files for versioning purposes. | Excel Discussion (Misc queries) |