MDN111
10-01-2007, 07:02 AM
Hello !
To make a serial number work as a hyperlink, I use de code below:
ActiveSheet.Hyperlinks.Add Anchor:=ActiveCell, Address:=cAddress
To transform the serial number to a hyperlink I first activate the sheet, then the cell containing the serial number and finally I lauch the macro containing the code mentioned above. cAddress is a variable containing the URL.
All this works well just as long I don't save the workbook. When I open the "Edit hyperlink" dialog box, the URL is appears decently. See Voor-Saven.jpg.
When I save the workbook, It doesn't work anymore. If I click on the hyperlink, an error message appears saying the address is not valid. If I take a look at the "Edit hyperlink" dialog box again, the URL is not the same than it was before I saved the workbook. See Na-Saven.jpg.
Can anyone explain me what can cause such a problem and how to fix it?
Many thanks in advance,
MDN111.
To make a serial number work as a hyperlink, I use de code below:
ActiveSheet.Hyperlinks.Add Anchor:=ActiveCell, Address:=cAddress
To transform the serial number to a hyperlink I first activate the sheet, then the cell containing the serial number and finally I lauch the macro containing the code mentioned above. cAddress is a variable containing the URL.
All this works well just as long I don't save the workbook. When I open the "Edit hyperlink" dialog box, the URL is appears decently. See Voor-Saven.jpg.
When I save the workbook, It doesn't work anymore. If I click on the hyperlink, an error message appears saying the address is not valid. If I take a look at the "Edit hyperlink" dialog box again, the URL is not the same than it was before I saved the workbook. See Na-Saven.jpg.
Can anyone explain me what can cause such a problem and how to fix it?
Many thanks in advance,
MDN111.