w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Get value from a cell in a closed workbook, file name made up of variables

You can get a value from a closed workbook in VBA:

Debug.Print ExecuteExcel4Macro("'F:Documents and
SettingsstudentMy Documents[AndysData7.xlsx]Staff List'!R6C4")

The formula needs to be in R1C1 format.

This is an undocumented feature though, and may not work in future Excel versions.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.