Hello everyone, first i'd like to thank this community for giving me the opportunity to learn about VBA and make my working and personal life more efficient!
In my workbook I have got lots of macros that do various things and i'm at the point where I feel confident enough to add some error-checking and debugging to them.
In the code below, Excel is looking for a CSV file that has been downloaded from the internet and is currently open. Since it has a different ending to it's name each time it is downloaded, excel has to cycle through the open workbooks until it finds the right one, and then run the routine. This works a treat and if there is no sheet open it gives the user a message asking if they want to go online and get a download.
However, I'm not familiar enough with the FOR loop in order to put that msgbox in the right place, so even once the sheet has been found and the routine has been successful i get the popup. Can anyone please give me a suggestion on what to do to make the msgbox only pop up when no orders sheet has been found?
As a side note, I'm aware that the code contains a copy/paste instead of range.value = range.value but for some reason the code doesn't react well when i change it to that method. Maybe i'm not being explicit enough since excel doesn't actually know the name of the orders workbook? Either way this is a remnant from the time before I had learnt so much about VBA and i'll revisit to make the code better in the futurePlease Login or Register to view this content.
Bookmarks