Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Checking for VBA5, not VBA6

Thanks to Tom Ogilvy, I understand you can check for VBA6 using:

#If VBA6 then

Msgbox "Yes"

#Else

Msgbox "No"

#End if

When I replaced the "VBA6 with "VBA5" in Excel 97, the code returned "No".

Am I properly referencing the version by entering VBA5?
Should I be checking something else? Is it VBA5.0, I don't know.

Thanks,

Matt
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Checking for VBA5, not VBA6

There isn't a compiler constant named VBA5. You can only use VBA6.
In VBA help, do a search for #If, then look under "See Also" for Compiler
Constants

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Matt Somers" wrote in message
om...
Thanks to Tom Ogilvy, I understand you can check for VBA6 using:

#If VBA6 then

Msgbox "Yes"

#Else

Msgbox "No"

#End if

When I replaced the "VBA6 with "VBA5" in Excel 97, the code returned "No".

Am I properly referencing the version by entering VBA5?
Should I be checking something else? Is it VBA5.0, I don't know.

Thanks,

Matt



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Checking for VBA5, not VBA6

What are you trying to differentiate. In the original you wanted separate
code for VBA6 (xl2000 or later) and VBA5 (xl97). The #if statement provides
that separation. It is unclear what additional differentiation you want.
As Rob stated, there is no VBA5 variable that is predefined.

--
Regards,
Tom Ogilvy

Matt Somers wrote in message
om...
Thanks to Tom Ogilvy, I understand you can check for VBA6 using:

#If VBA6 then

Msgbox "Yes"

#Else

Msgbox "No"

#End if

When I replaced the "VBA6 with "VBA5" in Excel 97, the code returned "No".

Am I properly referencing the version by entering VBA5?
Should I be checking something else? Is it VBA5.0, I don't know.

Thanks,

Matt



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Checking for VBA5, not VBA6

Thanks guys for the answer. That's basically all I needed to know. I
hadn't seen the question addressed directly, so I figured, I would ask.

Matt Somers

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
Spell Checking with checking cell notes jfitzpat Excel Discussion (Misc queries) 0 August 8th 07 10:26 PM
Problem interacting between VB.NET and VBA6 with Excel 2003 Nicholas Dreyer Excel Discussion (Misc queries) 0 April 6th 07 04:07 AM
File Not Found: VBA6.DLL WLMPilot Excel Discussion (Misc queries) 0 September 4th 05 06:43 PM
FILE NOT FOUND: VBA6.DLL WLMPilot Excel Discussion (Misc queries) 0 April 28th 05 07:30 PM
File Not Found: VBA6.DLL WLMPilot Excel Discussion (Misc queries) 1 April 20th 05 04:31 PM


All times are GMT +1. The time now is 01:37 AM.

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"