Hi,
I have a macro where i am opening a file , processing the file then closing the file.
For some reason when i execute the close file operation the program hangs up. I have to press cntrl+alt+delete to stop macro.
Any ideas?
Hi,
I have a macro where i am opening a file , processing the file then closing the file.
For some reason when i execute the close file operation the program hangs up. I have to press cntrl+alt+delete to stop macro.
Any ideas?
You might want to include the workbook as an attachment, or at minimum the procedure that the .close method is hanging up in. Otherwise we're just guessing.
Speaking of guess... have you qualified which workbook you're trying to close? Such as:Please Login or Register to view this content.
Please Login or Register to view this content.
Please Login or Register to view this content.
Last edited by Solus Rankin; 08-26-2013 at 10:10 AM.
Thanks,
Solus
Please remember the following:
1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.Highlight the code in your post and press the # button in the toolbar.2. Show appreciation to those who have helped you by clicking below their posts.
3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.
"Slow is smooth, smooth is fast."
hi XeRo Solus,
I have used this in other applications
where fl_nm_to_open is a string which contains the file name.Please Login or Register to view this content.
I seem to have run into this before.........i seem to recall something about clearing clipboard. I did a search on my old posts but could not find anything.
hi XeRo Solus,
Upon further review it might be something not related to the .close operation.........having something "strange" going on. I thought it was due to .close operation but now i am not sure.
Hang Up could mean the code is running very very slow and when you try to close it by forcing it, it will crash and you get an error. To find out why the code is running slow is: Run the code step by step by pressing F8 and step over each line and see in which line of the code hangs up.
Also, try workbooks(wb.name).close instead of the full path.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks