View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Shailesh Shah[_2_] Shailesh Shah[_2_] is offline
external usenet poster
 
Posts: 114
Default Performing code without opening the Workbook

Hi Todd,

If you want a value from closed workbook then try this,

Sub Test()
ActiveCell.Formula = "='c:\mypath\[mywbname.xls]mysheetname'!a1"

'to remove link convert it to value
ActiveCell.Value = ActiveCell.Value

End Sub


Regards,
Shah Shailesh
http://members.lycos.co.uk/shahweb/


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!