98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Using a function across multiple workbooks | Excel forum
Using a function across multiple workbooks | Excel forum
Resolved · Medium Priority · Version 2010
Orla has attended:
Excel VBA Intro Intermediate course
Access Intermediate course
Using a function across multiple workbooks
Hi,
I have set up a code that starts in file A, opens file B, and runs code on the new file B.
However, I have set up a function in file A that i need to use in file B. the code all runs perfectly, however, the function doesn't seem to work in file B.
The function is used to get the date from the week number, and while it works in file A, I can't see it at all in file B.
How can I share a function across multiple workbooks?
Thanks! :)
RE: Using a function across multiple workbooks
Hi Orla
Thanks for getting in touch. Much like increasing the scope (visibility) of variables, you can do the same with functions.
Try prefixing your function with 'Public', e.g. Public Function MyFunct(x,y)...
Kind regards
Gary Fenn
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector
Mon 24 Dec 2012: Automatically marked as resolved.
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Viewing Many WorksheetsIf there are more worksheets in your workbook than there is room to show all their tabs at the bottom of the screen - Right click on the navigation arrows. A list of all your worksheets is shown. You just click on the one that you want to access. If you have more than 15 worksheets, select in the list and choose your worksheet from hundreds. |