当链接从地址中断时,excel中的超链接 [英] hyperlinks in excel when the link is broken from the address
问题描述
comp rev17 9 01-16.xlx更改为y:abc\sublet\sub comp rev18 10-01-16.xlx
Sheet对象的超链接集合可以循环使用。如果要更改所有工作表,则为工作表创建另一个循环。
对于工作表中的每个sh
对于sh.Hyperlinks中的每个hyp
sh.Address =" New Address"
next hyp
next sh
但新地址与旧地址的关系如何?如果不相关则需要获取旧地址,在表中找到它,获取新地址,更改地址(如VLOOKUP)
如果可以,我们可以提供代码详细说明上述内容。
hyperlinks in excel when the link is broken from the address , how could I write a vb code so when I open the worksheet it will automatically search all the links and to be able to update the address if the address has changed. for example : y:abc\sublet\sub comp rev17 9 01-16.xlx changes to y:abc\sublet\sub comp rev18 10-01-16.xlx
The hyperlinks collection of Sheet object can be looped for the same. If you want to change for all sheet then create another loop for sheet.
For Each sh in Worksheets
for Each hyp in sh.Hyperlinks
sh.Address="New Address"
next hyp
next sh
But how the new address is related with old adress ? If not related then you need to get old address, find it in a table, get the new address for that,change the address (Like VLOOKUP)
We can give a code if you could give detail for above.
这篇关于当链接从地址中断时,excel中的超链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!