Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I make the page split into 2, and have them the same? KB84 Excel Discussion (Misc queries) 2 January 11th 10 07:50 PM
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
Is it possible to split the page in columns like in word??? byby[_3_] Excel Worksheet Functions 4 April 13th 08 08:11 AM
If a row in excel doesn't fit on one page can I split it up? Jeanette Excel Discussion (Misc queries) 0 January 10th 06 05:23 PM
split page with different formats? multiple formatting Excel Discussion (Misc queries) 3 May 1st 05 06:50 PM


All times are GMT +1. The time now is 10:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"