ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Editing Code from Code (https://www.excelbanter.com/excel-programming/377736-editing-code-code.html)

Barkingmadscot

Editing Code from Code
 
I have addin i load automatically and start in code, but i only want to
load the addins a some execl sheet on all, The reason i can have the
addin loading all the time is the addins is licence based and has
licence server.

I want to add code into the each execl sheet that requires the addin to
be loaded.

Private Sub Workbook_Open()

Run ("MyAdd")

End Sub

We have hunderds of excel sheets and about small fraction requires this
add. Can i copy the lines of code about to the start of execl sheets.
The users that use this addin also open execl and dont require the
addins and i dont what them using the addin.

At the moment i have a message asking each time a excel sheet loaded
(when that addin is enable) if the addin is to be loaded.

What i want to do is ask the user if the addin is required then copy
the lines of codes to currently opened workbook and never asked again.
I know i will have some work. Just need help on how to copy/write
lines of codes from the addin to the worksheet, that if it is possible


Niek Otten

Editing Code from Code
 
Try this:

http://www.cpearson.com/excel/vbe.htm

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Barkingmadscot" wrote in message oups.com...
|I have addin i load automatically and start in code, but i only want to
| load the addins a some execl sheet on all, The reason i can have the
| addin loading all the time is the addins is licence based and has
| licence server.
|
| I want to add code into the each execl sheet that requires the addin to
| be loaded.
|
| Private Sub Workbook_Open()
|
| Run ("MyAdd")
|
| End Sub
|
| We have hunderds of excel sheets and about small fraction requires this
| add. Can i copy the lines of code about to the start of execl sheets.
| The users that use this addin also open execl and dont require the
| addins and i dont what them using the addin.
|
| At the moment i have a message asking each time a excel sheet loaded
| (when that addin is enable) if the addin is to be loaded.
|
| What i want to do is ask the user if the addin is required then copy
| the lines of codes to currently opened workbook and never asked again.
| I know i will have some work. Just need help on how to copy/write
| lines of codes from the addin to the worksheet, that if it is possible
|




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

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