bug hyperlinks and non-contiguous range selection

E

ed

Hi people, this is giving me a headache.
I can't seem to be able to reference non contiguous ranges once my code has
created a link.
Couldnt find a solution or a workaround for this issue

Sub atest()
Set CurrentSheet = ActiveSheet
CurrentSheet.Hyperlinks.Add Range("B8"), "ANYSHEETNAME!A1"
NonContiguousRange = "C1:C3,D5:D8"
Range(NonContiguousRange).Select
End Sub

I get (translated from french) on Excel 2002 SP3
Execution Error '1004'
'Range' Method of the '_Global' object failed

Absolutely no problem if i comment the Hyperlinks.Add out.
Non Contiguous ranges cannot be used in my whole code after just one
hyperlink was created.
Wether i .Activate or .Select stuff before the Range().Select doesnt make
any difference.

I prolly got something wrong, but i'm running out alternative syntaxes,
tests and ideas on how to work around this.

Any help appreciated

/ed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top