Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Split code in more than one page ?
I have made a pretty long page with VB code and now
I was thinking if it is possible to spilt the code over more than just one page, and then inlcude the other pages into the mainpage when ever they was needed ? -- Mit fotoalbum www.photo.activewebsite.dk |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Split code in more than one page ?
Good morning!
Yes, it is possible to have several code pages - the key thing to remember is to declare your variables appropriately - if you declare them on one sheet, but want them to be available to procedures in another, you'll need to declare them with PUBLIC and not with DIM. I usually have once code sheet just for declarations, with no code at all, just to keep things tody. Regards Pete "SpookiePower" wrote: I have made a pretty long page with VB code and now I was thinking if it is possible to spilt the code over more than just one page, and then inlcude the other pages into the mainpage when ever they was needed ? -- Mit fotoalbum www.photo.activewebsite.dk |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Split code in more than one page ?
"Peter Rooney" skrev i en meddelelse
... Good morning! Yes, it is possible to have several code pages - the key thing to remember is to declare your variables appropriately - if you declare them on one sheet, but want them to be available to procedures in another, you'll need to declare them with PUBLIC and not with DIM. I usually have once code sheet just for declarations, with no code at all, just to keep things tody. Regards Pete Thanks, thats just what I was looking for, but who do I create other pages ? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Split code in more than one page ?
In the VBA editor, click Insert-Module from the menu.
There is also a tool you can add to the toobar to do this - it's the third one in the "Insert" category. Onse inserted, you can rename the modules by highlighting their names in the "Properties" window. Regards Pete "SpookiePower" wrote: "Peter Rooney" skrev i en meddelelse ... Good morning! Yes, it is possible to have several code pages - the key thing to remember is to declare your variables appropriately - if you declare them on one sheet, but want them to be available to procedures in another, you'll need to declare them with PUBLIC and not with DIM. I usually have once code sheet just for declarations, with no code at all, just to keep things tody. Regards Pete Thanks, thats just what I was looking for, but who do I create other pages ? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Split code in more than one page ?
"Peter Rooney" skrev i en meddelelse
... In the VBA editor, click Insert-Module from the menu. There is also a tool you can add to the toobar to do this - it's the third one in the "Insert" category. Onse inserted, you can rename the modules by highlighting their names in the "Properties" window. Regards Pete Thanks :) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I make the page split into 2, and have them the same? | Excel Discussion (Misc queries) | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Is it possible to split the page in columns like in word??? | Excel Worksheet Functions | |||
If a row in excel doesn't fit on one page can I split it up? | Excel Discussion (Misc queries) | |||
split page with different formats? | Excel Discussion (Misc queries) |