A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Links and Linking
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Why VBA inserted link won't work????



 
 
Thread Tools Display Modes
  #1  
Old October 24th, 2003, 10:41 PM
Den
external usenet poster
 
Posts: n/a
Default Why VBA inserted link won't work????

Why does this not work.

If Left(WsMas.Range("MasLoanProduct").Value, 4) = "Busi" Or
Left(WsMas.Range("MasLoanProduct").Value, 4) = "Coml" Then
ActiveSheet.Hperlinks.Add _
Anchor:=WsMas.Range("MasChklstLnk"), _
Address:="U:\Loan Forms\Check Lists\COMMERCIAL CHECK LIST.xls", _
TextToDisplay:="COMMERCIAL CHECKLIST LINK"
End If

It is basicly trying, via VBA, to insert a link in a cell depending on the
value of another cell.

I get the following error

Method "Range" in object "Worksheet" failed.

Any suggestions appreciated.
Dennis


  #2  
Old October 28th, 2003, 09:22 AM
Bill Manville
external usenet poster
 
Posts: n/a
Default Why VBA inserted link won't work????

Den wrote:
I get the following error

Method "Range" in object "Worksheet" failed.


Most likely you have mistyped the range name,e.g. MasChklstLnk

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup

  #3  
Old October 29th, 2003, 05:16 PM
Haldun Alay
external usenet poster
 
Posts: n/a
Default Why VBA inserted link won't work????

Hi,

If you just copy and paste that code from VBA;

You misspelled hyperlinks.

ActiveSheet.Hperlinks.Add......
^
--
Regards

Haldun Alay

To e-mail me, please remove AT and DOT from my e-mail address.



"Den" , iletide şunu yazdı
...
Why does this not work.

If Left(WsMas.Range("MasLoanProduct").Value, 4) = "Busi" Or
Left(WsMas.Range("MasLoanProduct").Value, 4) = "Coml" Then
ActiveSheet.Hperlinks.Add _
Anchor:=WsMas.Range("MasChklstLnk"), _
Address:="U:\Loan Forms\Check Lists\COMMERCIAL CHECK LIST.xls", _
TextToDisplay:="COMMERCIAL CHECKLIST LINK"
End If

It is basicly trying, via VBA, to insert a link in a cell depending on the
value of another cell.

I get the following error

Method "Range" in object "Worksheet" failed.

Any suggestions appreciated.
Dennis




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:11 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.