View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Simon Lloyd[_101_] Simon Lloyd[_101_] is offline
external usenet poster
 
Posts: 1
Default Where 2 place the code? (Worksheet Codes Vs. Modules)


FARAZ QURESHI;241880 Wrote:
Some times some of the macro and code pieces are advised to be placed at
the
worksheet code level and sometimes a separate module operates well.
What is
the difference between both and how to identify the same?
--

Best Regards,
FARAZ A. QURESHI

It depends on how its written, but as a general rule if it
beginsPrivate Sub Worksheetthen its worksheet
code, if it beginsPrivate Sub Workbookit goes
in the Thisworbook module and lastly if it beginsSub
Macroit goes in a standard module and can be prefixed with
Public or Private.


--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=67461