Hi all, I am adding a hyperlink to an excel spreadsheet and it does place the hyperlink in the sheet, it shows up as a hyperlink but when you click it doesn't acutally work, you have to double click it, then click on a different cell and THEN it works... It also will not change the name to what I want it to or put in the note on mouse over?? Anybody else have this problem or no of a solution. Here is the code I am using for it:
with objExcel
.Range("A39").Select
.ActiveSheet.Hyperlinks.Add .Selection,"http://web1/ALLIANCE/ALLIANCETRACKINGDB/AllianceTrackingRecord.aspx?ID=" & strID & "&CustomerNo=" & strCustomerNO,,"Click Here for more information on this Customer","CustomerInfo"
end with
I wasn't thinking that there was something wrong in Excel, if I type it in it also works, no problem there. The problem is when I create it from VB, the code I placed in the original post, then I get the bad link in excel. Like I said before, you can double click the link, then click on another cell and THEN the link works just fine and if you then save the spreadsheet it works fine from then on. Am I doing something wrong in my code or is this just the best it can get from VB?? Is there a way to tell VB to "double click" the cell like I would do manually??
Well, even from within your spreadsheet, in order to get it to come close to working I had to select it, then to Insert/Hyperlink from the Excel dropdown menu.
I thought my original code already did that, from first post, or are you saying something in addition to this??
with objExcel
.Range("A39").Select
.ActiveSheet.Hyperlinks.Add .Selection,"http://web1/ALLIANCE/ALLIANCETRACKINGDB/AllianceTrackingRecord.aspx?ID=" & strID & "&CustomerNo=" & strCustomerNO,,"Click Here for more information on this Customer","CustomerInfo"
end with
If I double click on the cell that contains the link created from above and THEN I click on another cell, the hyperlink becomes active, without having to go to the menu or anything else. Anyone ever had this problem before??
Yeah, I saw that code, but it wasn't acting like a hyperlink until I did it manually (and even then, it didn't do anything but turn the mousepointer to an hourglass)