+ Reply to Thread
Results 1 to 3 of 3

Save as dialog box not showing when there are more than 2 For...Next loops.

  1. #1
    Registered User
    Join Date
    04-15-2014
    Location
    England
    MS-Off Ver
    2013
    Posts
    2

    Save as dialog box not showing when there are more than 2 For...Next loops.

    Hi all,

    Firstly, this is my first post and feel I should introduce myself, so Hello! I'm very much a novice when it comes to VBA in excel but have enjoyed my forays into the code so far. Being a chemistry teacher in a secondary school, using VBA has really helped me stay organised and sped up a lot of the admin tasks that comes with the job.

    So, here's the problem I'm having.

    I have created a 'planner' which automatically works out the number of lessons I have over the academic year with each of my classes. The code contains a series of 6 different For... Next loops that copy and insert rows containing formula multiple times (dependent on the number of days in a date range) and then calls the save as dialog box so I can save the file under a different name preserving the master workbook for use another time. Everything worked fine first time round. When I reopened the master file and ran the code again, the save as dialog box now no longer appears and excel ceases to work (just get the 'bong' sound when I try to interact with the window) and the only way to exit excel is via task manager.

    After commenting out the code, I have found that the problem only occurs when there are more than 2 For... Next loops in the code.

    Is this a known problem?
    Is there something that can be done?
    Is there a better way that doesn't use For... Next loops?

    Any help and/or advice will be greatly appreciated!

  2. #2
    Forum Contributor
    Join Date
    07-29-2014
    Location
    Oz
    MS-Off Ver
    2010
    Posts
    142

    Re: Save as dialog box not showing when there are more than 2 For...Next loops.

    It's likely you've created an infinite loop, which is causing excel to stop responding. If you post your code, we'll be able to help you fix it.

  3. #3
    Registered User
    Join Date
    04-15-2014
    Location
    England
    MS-Off Ver
    2013
    Posts
    2

    Re: Save as dialog box not showing when there are more than 2 For...Next loops.

    Here it is:

    Please Login or Register  to view this content.

+ 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] automatic name in 'save as dialog box' ok, but does not actually save the file?!
    By Pluym in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-02-2012, 10:05 AM
  2. Save as dialog with predefined filename does not save
    By a94andwi in forum Excel General
    Replies: 2
    Last Post: 04-20-2012, 03:23 AM
  3. Save as and the regular save as dialog box appears
    By Jessica.Bush in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-30-2011, 06:57 AM
  4. Delete worksheet - dialog box showing
    By Rick A in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-24-2006, 11:25 AM
  5. Replies: 2
    Last Post: 03-09-2006, 04:20 PM

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