Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a workbook with VBA programming in which caused Excel to close for
some reason. Now when I go to re-open the workbook and select either enable macros or disable macros at the prompt. I receive an error message which says the workbook is " locked for editing' and can only be opened as read-only. If I then continue it causes Excel to crash and close down. Can anyone advise how I can recover this workbook and attached VBA code please? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You could start here at Debra Dalgleish's site:
http://contextures.com/xlfaqApp.html#ReadOnly and http://contextures.com/xlfaqApp.html#AlreadyOpen If excel crashed, you could have a hidden instance of excel still running that's causing the trouble. Close all the visible instances of excel. Start windows task manager alt-ctrl-delete will get you to in winxp (home). You may have to choose task manager in other versions (Vista??) of windows. You should see no instance of Excel.exe on the Applications tab. If you do, you haven't closed all the visible instances. Do that before continuing. Now look at the Processes tab. Look for Excel.exe and end the process. Then close windows task manager and restart excel and test it out. Doing this won't give you a prompt to save any work. When I'm hiding excel and testing, I want a method of showing those instances of excel. I use a .vbs file with this in it: dim myXL On Error Resume Next Set myXL = GetObject(, "Excel.Application") If Err.Number = 429 Then msgbox "Excel is not running" else myxl.visible = true end If On Error GoTo 0 Set myxl = nothing You can copy this (starting with Dim and ending with Set myxl = nothing) and paste it into NotePad. Then save the file as UnHideExcel.VBS in a nice safe location on your pc. Then you can close any visible instances of excel run that .vbs file close that newly shown instance of excel run that .vbs file close the next newly shown instance of excel (do those last two steps until you get the "excel is not running" message.) Alan M wrote: I have a workbook with VBA programming in which caused Excel to close for some reason. Now when I go to re-open the workbook and select either enable macros or disable macros at the prompt. I receive an error message which says the workbook is " locked for editing' and can only be opened as read-only. If I then continue it causes Excel to crash and close down. Can anyone advise how I can recover this workbook and attached VBA code please? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel file locked and cannot delete file | Excel Discussion (Misc queries) | |||
downloading excel file for open causes "file is locked for editing | Excel Programming | |||
I get a file in use message telling me that the file is locked ? | New Users to Excel | |||
Trying to Open Excel File, But its says file is locked for editing | Excel Discussion (Misc queries) | |||
File is locked for Editing by user problem | Excel Discussion (Misc queries) |