View Single Post
  #2   Report Post  
bj
 
Posts: n/a
Default

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??