LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 157
Default Macro, Module, function, sub and This workbook and sheets ?

Hi,

For the last couple of days I have been indiscriminately pinching codes from
NG and pasting it in to This workbook or by inserting new modules without
understanding which should be used for what.

I am a newbie and want to learn VBA with excel.

Couple of questions based on this:-

1. What is the difference between Sub, Function, Module and code.

2. If I get a code ( from NG) where should I add it . Should I add it "This
workbook" or a new module. If possible please tell me in what circumstances
one should be adding the code in which of the above 2

3. What is the difference between Public, private with reference to both sub
and function.

4. When do we add codes to "Sheet1" rather than workbook.

5. Based on info from newsgroups I learned that a Macro/Module ( I believe
macro is recorded and module is anything which is written, please correct me
if am wrong) could be called. Can we call both a macro and function from
another function/macro

6. Can a module in sheet call a module in another shet/workbook or from
module 1.

Please guide me to the right source for learing these bsic concepts if
possible.

Regards,
Hari
India


 
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
Macro to Copy Sheets to new workbook KennyD Excel Discussion (Misc queries) 18 January 31st 10 01:25 PM
Need macro to consolidate all sheets in workbook Christine[_3_] Excel Discussion (Misc queries) 1 November 14th 08 03:50 AM
Macro to create new workbook and sheets Richard Excel Discussion (Misc queries) 1 July 31st 07 07:31 PM
VBA Code To have a macro repeat on all sheets in a workbook carl Excel Worksheet Functions 3 November 3rd 05 07:48 PM
How to automate a macro to run on all sheets in a workbook Maurice Roche Excel Programming 2 February 17th 04 03:05 PM


All times are GMT +1. The time now is 09:19 PM.

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

About Us

"It's about Microsoft Excel"