ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   WorkBook VS General Module (https://www.excelbanter.com/excel-programming/354112-workbook-vs-general-module.html)

Desert Piranha[_54_]

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


Bob Phillips[_6_]

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




Desert Piranha[_55_]

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



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com