![]() |
Function in another workbook
I have created my own function in VBA called Testdatesv in what I have
called my master workbook. But I end up wanting to use the function frequently in a file that VBA opens up (via a user open prompt). So when this file is open I want to call the function from the Master Workbook. I can get it to work as shown below: Range(Cells(1, 35), Cells(lastrow, 35)).FormulaR1C1 = "=IF(RC[1]=""Not in ANSOS"",""NA"",'Position Control-Master Workbook-with ONESTAFF.xls'!Testdates(RC[1],RC[3]))" But the problem is that then I cant change the save name of the Master Workbook. So somehow I want to have a variable name used for the reference So: master= Application.ActiveWorkbook.Name will get me Position Control-Master Workbook-with ONESTAFF.xls, but how do I reference this in the call to use the function??? |
All times are GMT +1. The time now is 07:25 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com