LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default 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???

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
REPT FUNCTION FROM WORKBOOK TO WORKBOOK CHESTER Excel Worksheet Functions 1 December 15th 07 03:19 PM
Share Workbook Function Sue Excel Worksheet Functions 0 January 23rd 07 11:09 AM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Call function from one workbook that resides in another workbook m Datasort Excel Programming 3 January 16th 05 10:33 PM
What workbook is calling the function Pierre Laporte Excel Programming 2 July 15th 04 04:53 PM


All times are GMT +1. The time now is 03:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"