Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Multiple Modules in the same workbook?


Is there problems with having more than one module in a workbook.

I've created a second module because I need to 'Sub DeleteModule()' for
one of them because it contains the 'Sub Auto_Open()' which I don't want
to carry over when I SaveAs.

Both modules ("module1", "B4Close") are in the same Workbook.


--
kartune85
------------------------------------------------------------------------
kartune85's Profile: http://www.excelforum.com/member.php...o&userid=35586
View this thread: http://www.excelforum.com/showthread...hreadid=555446

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Multiple Modules in the same workbook?

Hi Kartune85,

Is there problems with having more than one module in a workbook.


No. Indeed it is often desirable.


---
Regards,
Norman



"kartune85" wrote
in message ...

Is there problems with having more than one module in a workbook.

I've created a second module because I need to 'Sub DeleteModule()' for
one of them because it contains the 'Sub Auto_Open()' which I don't want
to carry over when I SaveAs.

Both modules ("module1", "B4Close") are in the same Workbook.


--
kartune85
------------------------------------------------------------------------
kartune85's Profile:
http://www.excelforum.com/member.php...o&userid=35586
View this thread: http://www.excelforum.com/showthread...hreadid=555446



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Multiple Modules in the same workbook?


The main procedures are located in "module1" (and accessed/referenced
from a Userform) and then that module is deleted (from within the
Userform), and I need 'Private Sub Workbook_BeforeClose()' to run from
module "B4Close" when the user goes to close the workbook. But it's not
executing the code.

Any idea's on what the problem might be? My Form is so close to
completion!

Thanks,

Kartune85


--
kartune85
------------------------------------------------------------------------
kartune85's Profile: http://www.excelforum.com/member.php...o&userid=35586
View this thread: http://www.excelforum.com/showthread...hreadid=555446

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Multiple Modules in the same workbook?


Is there a way of activating the second module and making it the modul
for 'ThisWorkbook' because I need to delete "module1" so that when
use 'SaveAs' for the workbook, 'Sub Auto_Open()' doesn't get carrie
across

--
kartune8
-----------------------------------------------------------------------
kartune85's Profile: http://www.excelforum.com/member.php...fo&userid=3558
View this thread: http://www.excelforum.com/showthread.php?threadid=55544



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Multiple Modules in the same workbook?

If you want to run BeforeClose from another procedure, why not strip the
code out from there and insert in procedure in the module, and call that new
procedure from B4Close and from the Workbook_BeforeClose?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"kartune85" wrote
in message ...

The main procedures are located in "module1" (and accessed/referenced
from a Userform) and then that module is deleted (from within the
Userform), and I need 'Private Sub Workbook_BeforeClose()' to run from
module "B4Close" when the user goes to close the workbook. But it's not
executing the code.

Any idea's on what the problem might be? My Form is so close to
completion!

Thanks,

Kartune85


--
kartune85
------------------------------------------------------------------------
kartune85's Profile:

http://www.excelforum.com/member.php...o&userid=35586
View this thread: http://www.excelforum.com/showthread...hreadid=555446



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
copying modules from one workbook to another workbook Vinod[_2_] Excel Discussion (Misc queries) 3 September 19th 08 06:18 PM
List all modules in workbook X? KR Excel Programming 5 May 19th 06 07:25 PM
Automatically Delete WorkBook 2 modules by using Workbook 1 module ddiicc Excel Programming 5 July 27th 05 12:53 PM
Copy Modules from One workbook to Active Workbook Jim Gifford Excel Programming 1 November 18th 03 12:30 PM
How to Compare Workbook VBA modules Dan[_26_] Excel Programming 2 October 16th 03 12:59 PM


All times are GMT +1. The time now is 05:28 AM.

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

About Us

"It's about Microsoft Excel"