Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default WorkBook VS General Module


Hi All,

Question is for either WorkBook Open or WorkBook Close.

Scenario # 1:
Code in WorkBook Open.

Scenario # 2:
Code in General Module with a Call in WorkBook Open.

Is there any advantages or disavantages to either scenario, other than
the call method uses more code?


--
Desert Piranha


------------------------------------------------------------------------
Desert Piranha's Profile: http://www.excelforum.com/member.php...o&userid=28934
View this thread: http://www.excelforum.com/showthread...hreadid=515617

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default WorkBook VS General Module

Both are workable, but scenario #2 is more general as that procedure can
easily be called elsewhere. Personally, I try to just use the event code in
Thisworkbook, and any common routines that get called are put in a general
module.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Desert Piranha"
<Desert.Piranha.23o22n_1140671403.4385@excelforu m-nospam.com wrote in
message news:Desert.Piranha.23o22n_1140671403.4385@excelfo rum-nospam.com...

Hi All,

Question is for either WorkBook Open or WorkBook Close.

Scenario # 1:
Code in WorkBook Open.

Scenario # 2:
Code in General Module with a Call in WorkBook Open.

Is there any advantages or disavantages to either scenario, other than
the call method uses more code?


--
Desert Piranha


------------------------------------------------------------------------
Desert Piranha's Profile:

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default WorkBook VS General Module


Hi Bob,

Thanks for your info, i appreciate it.

Thanks
Dave
Bob Phillips Wrote:
Both are workable, but scenario #2 is more general as that procedure
can
easily be called elsewhere. Personally, I try to just use the event
code in
Thisworkbook, and any common routines that get called are put in a
general
module.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Desert Piranha"
<Desert.Piranha.23o22n_1140671403.4385@excelforu m-nospam.com wrote in
message
news:Desert.Piranha.23o22n_1140671403.4385@excelfo rum-nospam.com...

Hi All,

Question is for either WorkBook Open or WorkBook Close.

Scenario # 1:
Code in WorkBook Open.

Scenario # 2:
Code in General Module with a Call in WorkBook Open.

Is there any advantages or disavantages to either scenario, other

than
the call method uses more code?


--
Desert Piranha



------------------------------------------------------------------------
Desert Piranha's Profile:

http://www.excelforum.com/member.php...o&userid=28934
View this thread:

http://www.excelforum.com/showthread...hreadid=515617



--
Desert Piranha


------------------------------------------------------------------------
Desert Piranha's Profile: http://www.excelforum.com/member.php...o&userid=28934
View this thread: http://www.excelforum.com/showthread...hreadid=515617

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
Run worksheet module code from workbook module? keithb Excel Programming 1 August 14th 05 04:04 AM
General ?? regarding Macro or Module size in a spreadsheet JohnG[_2_] Excel Programming 3 August 3rd 05 10:43 AM
Automatically Delete WorkBook 2 modules by using Workbook 1 module ddiicc Excel Programming 5 July 27th 05 12:53 PM
General protection fault in module HPPCL5F4.DLL at 0002:000006c2. Ben Excel Discussion (Misc queries) 1 January 4th 05 12:05 AM
Copy VBA Module and Form from Workbook to another workbook topaiva Excel Programming 1 November 25th 04 03:47 PM


All times are GMT +1. The time now is 07:03 PM.

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"