ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Running VBA Code not written within the currrent worksheet (https://www.excelbanter.com/excel-programming/339281-running-vba-code-not-written-within-currrent-worksheet.html)

DMB

Running VBA Code not written within the currrent worksheet
 
How do I Call procedures from any worksheet. I don't want to have to cut and
paste the code every time.

davegb

Running VBA Code not written within the currrent worksheet
 

DMB wrote:
How do I Call procedures from any worksheet. I don't want to have to cut and
paste the code every time.


If the sheet with the code is open it will be available. You can run it
from the macro list or assign a tool on a toolbar to run it. If you
want it aways available, put it in your PERSONAL worksheet.


Tom Ogilvy

Running VBA Code not written within the currrent worksheet
 
If you want to call it within the same project (same workbook), then put it
in a general module (in the VBE=Insert=Module).

Then it will be visible throughout the project if you do not declare it as
private.

--
Regards,
Tom Ogilvy

"DMB" wrote in message
...
How do I Call procedures from any worksheet. I don't want to have to cut

and
paste the code every time.





All times are GMT +1. The time now is 04:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com