Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default #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
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



All times are GMT +1. The time now is 06:42 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"