Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In an Excel2002 worksheet Col B is populated daily with 50-80 rows of
web page data all B cells with hyperlinks. eg. "http://www.mzmz.com/az/az_detail.php?save=1&id=158890PHPSESSID=andlotsoft rash789" The Col B Cells link location is constant through the "&id=" after which they change for each web page. I need to change the above external hyperlink address to a local address with a web archive file type extension. eg. "file:///C:\Documents and Settings\R\My Documents\T\AUS\2007\Data\158890.mht" I changed the following code (courtesy of David McRitchie's site) but cannot figure out how to handle the changing ID numbers. Dim OldStr As String, NewStr As String Dim hyp As Hyperlink OldStr = "http://www.mzmz.com/az/az_detail.php?save=1&id=" NewStr = "file:///c:\Documents and Settings\R\My Documents\T\AUS\2007\Data\ Sheets("Sheet3").Select For Each hyp In ActiveSheet.Hyperlinks hyp.Address = Replace(hyp.Address, OldStr, NewStr) Next hyp Any help appreciated. TIA Ron |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Edit REplace String | Excel Worksheet Functions | |||
How do I replace last numeric string from a alphanumeric string? | Excel Discussion (Misc queries) | |||
replace in a string | Excel Programming | |||
A Macro to replace a string in a cell with a string from another cell??? | Excel Programming | |||
Substring to replace string | Excel Programming |