+ Reply to Thread
Results 1 to 5 of 5

New macro, new module

  1. #1
    Registered User
    Join Date
    01-06-2019
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    5

    Question New macro, new module

    Im just starting to learn Excel Macros/VBA so it's probably an easy question:

    when i start to record a new macro, give it a name and press OK it puts the code in an already existing module, but I don't want that.
    I want this new macro to go in a new module.

    Q) how do i control/manage where new macro code goes?

    Thanks

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: New macro, new module

    You could just record it and then move it where you want ...
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    01-06-2019
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    5

    Re: New macro, new module

    i know...
    but i want to know why it does what it does so i can change it when/if i want

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: New macro, new module

    I've never looked hard because I see no value in it, but I've not seen anything in the UI to support it.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: New macro, new module

    I suspect you get a new module for a new recording session. In my experience, if I have existing modules and start to record a new macro, I will get a new module. Subsequent recorded macros go in the same module.

    Like shg, I’ve never paid a lot of attention to the logic. Most times I’m going to edit a recorded macro anyway so I usually make a copy, put it where I want it, and then edit it. That way I have the original to refer to and I can delete it when the edited macro works as required.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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. [SOLVED] Extra Sheet not a Chart or Old Macro Module or Worksheet - Appears to be normal module???
    By Doc.AElstein in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 06-06-2017, 04:10 AM
  2. Macro to export and import a module and assigning different macro automatically
    By Libster78 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-14-2015, 06:31 PM
  3. Compile error in hidden module: Module 1 when workbook opened on different machine!?
    By MathUKTeacher in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-06-2015, 04:38 PM
  4. [SOLVED] Code locks cells when inserted in sheet module but returns error in standard module
    By yoda66 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2014, 07:39 AM
  5. Replies: 1
    Last Post: 08-30-2011, 02:23 AM
  6. how to access Sheet module, normal module, Worbook module to type code
    By alibaba in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2009, 07:51 AM
  7. Replies: 2
    Last Post: 03-27-2009, 11:48 AM

Tags for this Thread

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