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