+ Reply to Thread
Results 1 to 4 of 4

ignoring an instruction on a macro loop if folder already exists

  1. #1
    Registered User
    Join Date
    09-04-2014
    Location
    Sydney, Australia
    MS-Off Ver
    2013
    Posts
    52

    Question ignoring an instruction on a macro loop if folder already exists

    Hi all, I have this coding in my macro
    Please Login or Register  to view this content.
    When I select true on my master list the code encounters an error the second time it runs as there is already a folder created. How do I make it ignore the instruction if a folder already exists?

    Appreciate any help in advance!

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: ignoring an instruction on a macro loop if folder already exists

    Hi,

    Try the following (untested):
    Please Login or Register  to view this content.
    Lewis

  3. #3
    Registered User
    Join Date
    09-04-2014
    Location
    Sydney, Australia
    MS-Off Ver
    2013
    Posts
    52

    Re: ignoring an instruction on a macro loop if folder already exists

    When I run the code with that coding I have an error that comes up in this line -
    Please Login or Register  to view this content.
    Any ideas as to why this may be happening?
    Regards,
    macro_

  4. #4
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: ignoring an instruction on a macro loop if folder already exists

    Hi Macro_,

    We need more specific information to be able to help you. If you could upload a sample workbook that demonstrates your problem, we would be able to diagnose your problem. Also it would be helpful, if you told us what the specific error was (e.g. runtime error 1004, etc.).

    To upload a file, click on 'Go Advanced', underneath the reply window. Then click on the 'PaperClip Icon' above, or the 'Manage Attachments' CommandButton below the message window.

    Lewis

+ 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. VBA to use cell contents to loop through folder to see if filename exists
    By bdunphy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-14-2013, 11:15 AM
  2. [SOLVED] Macro to loop through all files in a folder
    By aldo23 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-01-2013, 10:21 AM
  3. Macro ignoring Loop
    By chcwebb in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-19-2009, 06:22 PM
  4. Loop instruction for number of lines of data
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-11-2008, 10:09 AM
  5. Check if folder exists, if yes just copy sheet in to folder?
    By Simon Lloyd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-19-2006, 10:44 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