I am trying to replace strings (for example all digits) in Excel 2003 (VB5.5) via macro.
Now, I have this code:
Sub DeleteDigits()
Dim hLink As Hyperlink
Dim wSheet As Worksheet
For Each wSheet In Worksheets
For Each hLink In wSheet.Hyperlinks
hLink.Address = regEx.Replace(hLink.Address, "\d", "")
Next hLink
Next wSheet
End Sub
I checked Regular Expressions in References, but I do not know how to get through the message that hLink.Address is not an object, which is the error I am getting.
Replacedoesn’t support three arguments. You must set the pattern first via a property. Like so:EDIT:
Supporting documentation: