Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default HyperLink problem

Hi,
I need to VBA the creation (and subsequent update) of
a hyperlink to an external file in a shared workbook. The
VBA gives me a runtime error. Any ideas on how to go
around the apparent restriction?
Note: The sharing cannot be turned off.

If you could copy your response to my e-mail
, I will appreciate it greatly.
Thanks in advance,
Luda

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default HyperLink problem

'shname : name of the sheet, range string

Call DynamicHyperLinks(ShName, "C156:C230")

'Here is the function for hyperlinks
Sub DynamicHyperLinks(ShtName As String, Rng As String)
Dim C1
Dim C
Dim sh As Worksheet
Dim LinkStr

For Each C1 In Sheets(ShtName).Range(Rng)

LinkStr = Split(C1, ".")
C1.Value = LinkStr(0) 'checking file name & sheet
name then creates link
For Each sh In ActiveWorkbook.Sheets

If sh.Name = LinkStr(0) Then

Set C = Sheets(ShtName).Range(Rng).Find
(What:=sh.Name, LookAt:=xlWhole)
ActiveSheet.HyperLinks.Add Anchor:=C,
Address:="", SubAddress:="'" & sh.Name & "'!A1",
ScreenTip:="Click On Links"
End If

Next

Next

Set sh = Nothing
End Sub


-----Original Message-----
Hi,
I need to VBA the creation (and subsequent update) of
a hyperlink to an external file in a shared workbook.

The
VBA gives me a runtime error. Any ideas on how to go
around the apparent restriction?
Note: The sharing cannot be turned off.

If you could copy your response to my e-mail
, I will appreciate it greatly.
Thanks in advance,
Luda

.

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
Hyperlink problem. WenyanCong Excel Discussion (Misc queries) 1 May 10th 09 06:01 AM
Hyperlink Problem Globe Director Excel Worksheet Functions 2 July 20th 07 05:00 PM
Hyperlink Problem John Calder Links and Linking in Excel 1 November 25th 05 11:46 PM
Hyperlink problem Glenn Richardson Excel Worksheet Functions 2 August 31st 05 09:09 AM
Problem with hyperlink Eamon Excel Discussion (Misc queries) 0 March 30th 05 08:07 PM


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