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!
Bookmarks