Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Changing Hyperlinks?
Ok, I have a problem...
When I begin to change 312 some hyperlinks in a worksheet By starting out with: Fix Hyperlinks (#FixHyperlinks) Sub FixscannedHyperlinks() Dim OldStr As String, NewStr As String OldStr="S:\users\Z011528\matt p\scanned dwgs\" NewStr="S:\Sundata\cad\maintenance\scanned dwgs\" Dim hyp As Hyperlink For Each hyp In Activesheet.Hyperlinks hyp.Address=Replace(hyp.Address, OldStr, NewStr) Next hyp End Sub Excel Prompts me with a "compile error" "expected indentifier" and the first line: Fix Hyperlinks (#FixHyperlinks) is highlighted in red! Whats wrong?? |
#2
|
|||
|
|||
I assume (shudder) that the "Fix Hyperlinks (#FixHyperlinks)" line is a comment
insert a hyphen in front of it and retry. If it is not a comment, What is it for? "Madvikefan" wrote: Ok, I have a problem... When I begin to change 312 some hyperlinks in a worksheet By starting out with: Fix Hyperlinks (#FixHyperlinks) Sub FixscannedHyperlinks() Dim OldStr As String, NewStr As String OldStr="S:\users\Z011528\matt p\scanned dwgs\" NewStr="S:\Sundata\cad\maintenance\scanned dwgs\" Dim hyp As Hyperlink For Each hyp In Activesheet.Hyperlinks hyp.Address=Replace(hyp.Address, OldStr, NewStr) Next hyp End Sub Excel Prompts me with a "compile error" "expected indentifier" and the first line: Fix Hyperlinks (#FixHyperlinks) is highlighted in red! Whats wrong?? |
#3
|
|||
|
|||
Hi!
It should be red! I take it it is meant to be a title or comment, in which case, put a ' in front of it. Alf |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
hyperlinks following in copies of original file | Excel Discussion (Misc queries) | |||
Problems with hyperlinks | Excel Discussion (Misc queries) | |||
Can 2 different hyperlinks be in the same Excel cell? | Excel Worksheet Functions | |||
hyperlinks and copying a worksheet | Excel Worksheet Functions | |||
up-date hyperlinks in Excel | Excel Worksheet Functions |