+ Reply to Thread
Results 1 to 3 of 3

MACRO Query relating to VBA codes to put up into modules

  1. #1
    Forum Contributor PRADEEPB270's Avatar
    Join Date
    02-19-2010
    Location
    INDIA
    MS-Off Ver
    MSoffice-2016
    Posts
    332

    MACRO Query relating to VBA codes to put up into modules

    I have a 2 VBA Codes file and want to put up in a macro enable file.First of all,I am doing Alt+F11 and then Ctrl+R.In my left hand side,microsoft Excel objects appear with Sheet1 (Sheet1) and etc.sheet...and finally "Thisworkbook" also appear.

    Can anyone suggest what are these?

    If having one VBA code file then what option should be used? Either Sheet1 ( sheet1) or Thisworkbook.Same having 2 or 3 VBA codes files.

    Please refer the attach file for more clarification.
    Attached Files Attached Files
    Regards


    Pradeep Kumar Gupta
    Gurgaon ( INDIA )

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: MACRO Query relating to VBA codes to put up into modules

    You can use the sheet1/thisworkbook objects to store macros that are triggered by events. For example, if you wanted to Select the first sheet whenever a workbook is opened you could put:
    Please Login or Register  to view this content.
    in the thisworkbook object, or to select A1 whenever a sheet1 is activated you could put
    Please Login or Register  to view this content.
    In the sheet1 object.

    If you just have general macros which do not rely on a particular event or sheet/workbook object it is usually best to place them in a standard module (insert->module). This will appear in a seperate folder titled "module" underneath the sheet/workbook objects in the project folder view.

  3. #3
    Forum Contributor PRADEEPB270's Avatar
    Join Date
    02-19-2010
    Location
    INDIA
    MS-Off Ver
    MSoffice-2016
    Posts
    332

    Re: MACRO Query relating to VBA codes to put up into modules

    Thanks for the suggestion.It will help me to decide what to do.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macro which picks out dates and the data relating to them
    By Newton1234 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-29-2008, 06:24 AM
  2. vba codes for refreshing cell data from web query
    By nhat8121 in forum Excel General
    Replies: 3
    Last Post: 01-06-2007, 09:51 PM
  3. Replies: 8
    Last Post: 05-19-2006, 05:45 PM
  4. [SOLVED] Public, Private, Event modules, Forms modules,,,
    By Jim May in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-31-2005, 12:05 AM
  5. [SOLVED] Basic question - modules and class modules - what's the difference?
    By Mark Stephens in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-08-2005, 07:08 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1