+ Reply to Thread
Results 1 to 6 of 6

Multiple Macros in module under the same range

  1. #1
    Registered User
    Join Date
    01-26-2021
    Location
    London
    MS-Off Ver
    Excel2016
    Posts
    4

    Multiple Macros in module under the same range

    Hi Guys,

    I hope you would be able to help me, I've tried to find this solution but without any luck.
    Basically I have almost the same macros responsible for importing data from shared mailbox subfolders. I was unable to write the code where i will be connected to all those subfolders under one macro (in the same time) so I figure out the workaround where i have multiple the same codes but pointing different subfolders. What i like to have is to download those emails to the same range but without overwriting. So the first macro downloads emails from the first subfolder then next macro goes to the second subfolder and paste next emails below the last record from the first import (use first empty cell/rows) in the same range (e.g. columns A-E).

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Multiple Macros in module under the same range

    Can you post some sample code?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    01-26-2021
    Location
    London
    MS-Off Ver
    Excel2016
    Posts
    4

    Re: Multiple Macros in module under the same range

    Sure, below i have two codes in one module. At the moment range is the same so the problem with overwriting appears. Here I see two solutions:
    1. Mitigate all codes in to one, to import data from all shared mailbox subfolders using one code, one by one.
    2. Set up codes as below, one code - one subfolder.
    The problem is that i would like to have all this data imported from all subfolders under the same range (data from 1st subfolder than data from 2nd subfolder - range A3-E3).

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,705

    Re: Multiple Macros in module under the same range

    No code ...
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    01-26-2021
    Location
    London
    MS-Off Ver
    Excel2016
    Posts
    4

    Re: Multiple Macros in module under the same range

    Sorry, forum did not allow me to send a code.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,705

    Re: Multiple Macros in module under the same range

    Then provide a workbook with the code in it.

+ 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] Making variable available for other macros within current module
    By jprlimey in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-04-2018, 03:53 PM
  2. [SOLVED] multiple macros in one module?
    By davemon in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-03-2017, 11:35 AM
  3. [SOLVED] Module all Macros run only after specific condition.
    By rr1050 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-27-2016, 07:38 PM
  4. [SOLVED] Which Module Macros are Going?
    By oskar44 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-21-2015, 05:28 PM
  5. Replies: 2
    Last Post: 02-15-2015, 11:36 AM
  6. Why are certain Macros grouped in a single Module?
    By Jiptastic in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-25-2012, 04:52 AM
  7. 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

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