ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Marco & hyperlink (https://www.excelbanter.com/excel-programming/354204-marco-hyperlink.html)

gerard D

Marco & hyperlink
 
While writing a macro i found a problem which I can't solve.
On the worksheet is a hyperlink containing a datevalue, this has to change
on a dailybase but while writing the macro it writes down the date in the
macro and it won't change the next time i use the macro.
Does any one know how to solve this problem.

Thanks Gerard

Gary''s Student

Marco & hyperlink
 
Here is one approach:

If the hyperlink is on a worksheet (say cell A1) then:

Function hyp2(r As Range) As String
hyp2 = r.Hyperlinks(1).Address
End Function


will get you the URl portion (a string). Use REPLACE() to update the date
within the URL and then re-construct the hyperlink with the new URL
--
Gary''s Student


"gerard D" wrote:

While writing a macro i found a problem which I can't solve.
On the worksheet is a hyperlink containing a datevalue, this has to change
on a dailybase but while writing the macro it writes down the date in the
macro and it won't change the next time i use the macro.
Does any one know how to solve this problem.

Thanks Gerard



All times are GMT +1. The time now is 05:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com