excel - Getting the string of an external link to another worksheet's cell? -
the worksheet object has paste method has parameter named link. if set true link created range selected cursor, range on clipboard (aka. sorrounded marching ants). resulting link in cells like:
='\\des001\home folder\[the book.xlsx]sheet1'!$a$1
now, there function returns string itself? (without = sign)
you can read string. not sure how have link build address , subaddress can this.
my link in cell c3. have change whatever cell link in.
private sub commandbutton36_click() dim ws excel.worksheet set ws = activeworkbook.sheets("sheet1") dim s string s = ws.range("c3").hyperlinks(1).address 'or s = ws.range("c3").hyperlinks(1).subaddress msgbox (s) end sub
Comments
Post a Comment