LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Preventing compile errors when referencing objects ehanced after 1997

Hey Guys and Gals:

I am using the Hyperlink object for an Excel application intended for
use on Excel 97 and Excel 2000. I developed the code in 2000 with
syntax like:

ActiveSheet.Hyperlinks.Add Anchor:=Selection Address:="",
SubAddress:="", ScreenTip:="This is it, yea"

...but oops, darn it.

In 1997, ScreenTip was not around..so I'm talking space shuttles when
the program's talking Kitty Hawk..so I tried (code below) and got a
"compile error"

if left(Application.version,1) <= 8 then

ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
SubAddress:=""

else

ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
SubAddress:="", ScreenTip:="This is it, yea"

end if

Compile error makes sense in retrospect. (but its always rush, rush,
rush and not much thinky, thinky, thinky)

Matt
 
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
PDFMaker and Compile Errors LinKay Excel Discussion (Misc queries) 2 February 5th 08 06:10 PM
Problem with preventing objects moving and sizing with cells Nichelle H. New Users to Excel 2 May 31st 07 04:17 AM
Preventing errors koit Excel Discussion (Misc queries) 7 February 21st 06 11:14 PM
compile errors johnny Excel Discussion (Misc queries) 1 February 24th 05 11:49 PM
Compile Errors Patricia[_3_] Excel Programming 2 October 17th 03 11:48 AM


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