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

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -