+ Reply to Thread
Results 1 to 5 of 5

Split code in more than one page ?

  1. #1
    SpookiePower
    Guest

    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. #2
    Peter Rooney
    Guest

    RE: 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. #3
    SpookiePower
    Guest

    Re: Split code in more than one page ?

    "Peter Rooney" <[email protected]> skrev i en meddelelse
    news:[email protected]...
    > 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. #4
    Peter Rooney
    Guest

    Re: 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" <[email protected]> skrev i en meddelelse
    > news:[email protected]...
    > > 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. #5
    SpookiePower
    Guest

    Re: Split code in more than one page ?

    "Peter Rooney" <[email protected]> skrev i en meddelelse
    news:[email protected]...
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1