Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default FollowHyperlink causes error

it stops on this line
Set xRange = Range(rngRange)
where rngRange is a RefEdit control with a valid range reference in it


The Refedit contol defaults to its value property, range address including
sheet name. If the workbook is no longer active you will have a problem to
reference the range.

Try something like this (in the userform)

Private m_rngRF As Range

Private Sub RefEdit1_Change()
Set m_rngRF = Range(RefEdit1.Value)
End Sub


then when you want your range simply refer to the range object m_rngRF (of
course you will also need to have checked it exists, ie user has selected a
range)

Regards,
Peter T

"Michelle" wrote in message
...
I have some code that works fine, unless I have followed a hyperlink first.

I have built a form which all works correctly, and I have now added an
image which triggers a hyperlink in its click-event.
(ActiveWorkbook.FollowHyperlink Address:="http://www.myAddressHere.co.uk",
NewWindow:=True)

If I use the hyperlink, and then go back and try and continue using the
form, then nothing works, I get an error:
Method 'Range' of object '_Global' failed

it stops on this line
Set xRange = Range(rngRange)
where rngRange is a RefEdit control with a valid range reference in it -
it works fine if I haven't clicked the hyperlink first.

I could lose the hyperlink, but I'd really like to get to the bottom of
this. Any ideas?

Thanks

Michelle



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
I need some Help with FollowHyperlink please (Error 432) Trefor Excel Programming 1 August 7th 06 12:20 PM
FollowHyperlink failing Andrew Fiddian-Green Excel Programming 0 January 9th 06 11:59 AM
FollowHyperlink to OLEObject Tony Excel Programming 0 January 5th 05 10:15 PM
FollowHyperlink Mike Archer[_3_] Excel Programming 0 December 19th 03 12:26 PM
followhyperlink Mike Archer[_2_] Excel Programming 0 December 18th 03 03:19 PM


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