ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Workbook closed by VBA not Closing Properly (https://www.excelbanter.com/excel-programming/345865-workbook-closed-vba-not-closing-properly.html)

blayne

Workbook closed by VBA not Closing Properly
 
I am stumped by this problem!
I have written code to open an excel workbook
modify information through a user form
close the work book
then rename the folder the workbook is in

everything works fine Untill renaming the folder then I get I get error 75
(path/file access error).
I have tried to manualy renaming the folder and get a Windows Sharing Error
therefore I think the file is not closing proprerly
If I close Excel I can rename the folder immediatly
Can ANYONE explain what has happend & how to fix it?

--
Fuzzy logix

JNW

Workbook closed by VBA not Closing Properly
 
You can't rename the folder that contains an open workbook. It changest the
files path, which cannot be done in Windows. You could use another workbook
to open the other file, change it, close it, and rename the folder.

"blayne" wrote:

I am stumped by this problem!
I have written code to open an excel workbook
modify information through a user form
close the work book
then rename the folder the workbook is in

everything works fine Untill renaming the folder then I get I get error 75
(path/file access error).
I have tried to manualy renaming the folder and get a Windows Sharing Error
therefore I think the file is not closing proprerly
If I close Excel I can rename the folder immediatly
Can ANYONE explain what has happend & how to fix it?

--
Fuzzy logix


goober[_13_]

Workbook closed by VBA not Closing Properly
 

An option around this problem is to create the new folder first and then
save the workbook into the created folder.


--
goober
------------------------------------------------------------------------
goober's Profile: http://www.excelforum.com/member.php...o&userid=19838
View this thread: http://www.excelforum.com/showthread...hreadid=485963



All times are GMT +1. The time now is 12:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com