Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grab Filename from linked cell formula

Status
Not open for further replies.

Ebes1099

Technical User
Jul 8, 2009
156
US
Is there a way I can grab the filename out of a cell that has a formula linking to it? In my VBA code, I want to open another workbook and count the number of rows in a tab but I won't know the name of the other workbook. I will have to pull the filename out of a cell formula in my current workbook. Is that possible?
 
You can use Formula property to get the formula and extract path and file name.
If the link is open its path disappears, to get the path you can either get the path from the source workbook or search an array returned by LinkSources method applied to workbook with link.

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top