![]() |
#if..#else..#end if.
Dear Group:
I have been thumping head, mentally speaking, over a little piece of code from Tom Ogilvy. From reviewing other submissions, the code and the use of it appear to be pretty standard. Well all was working fine, until this morning when I was staring at my computer delariously at around 3AM. Suddenly, the code, instead of stopping on the #else condition began stopping on the #if vBa6 and running that code. It's pretty weird, because I'm running Excel 97 (With VBA5, (I still don't know how explicity check for VBA5)). Obviously, I received an error on the "ScreenTip" part of the Hyperlinks.Add. Yea, no kidding, thats why wrote this code. Well I spent my time at Church this morning, thinking about this problem..sorry God. Well before I completely turn this into a journal entry, here's my code below. Can anyone tell me why it thinks I am running VbA6? Dim WKS_RNG as range Set WKS_RNG = ActiveSheet.Range("A1") WKS_RNG.Select #if vba6 then ActiveSheet.HYPERLINKS.ADD ANCHOR:=SELECTION, Address:="", SubAddress:="", ScreenTip:="Hello World" #else ActiveSheet.HYPERLINKS.ADD ANCHOR:=SELECTION, ADDRESS:="", sUBADDRESS:="" #end if ...Please ignore any minor syntax issues, unless you feel they contribute to the error. Thanks, Matt |
All times are GMT +1. The time now is 10:52 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com