excel file crashed while executing a macro


Posted by Ania on January 26, 2002 9:47 AM

is there a way to open an excel file in VBEditor without opening excel?

Posted by JACK IN THE UK on January 26, 2002 10:43 AM

Hi Ania-
dont know of a way as VB Editor is dependant on Excel, you can run VB Editor if you wish from Developement tools its called Professional Script editor, or as i do export all codes as BAS files and editit in word prcessor, and import (copy / paste ) to ned Module.

If you have VB you can also write VBA but VB have commands unknown to VBA so take care the language is slightly different.

HTH
Jack in the UK


BTW just though, why do you ask? what are you trying to do?

Posted by Ania on January 26, 2002 11:02 AM

hm... well, excel file was corrupted when excel crashed while running a macro (if you paid attention to the subj. you would have noticed that...) and obviously, VB editor itself does not allow excel files to open and neither doees visual studio...



Posted by Jack in the UK on January 26, 2002 11:35 AM

Hi Ania--
Please dont think im having a go - im trying to help.


is there a way to open an excel file in VBEditor without opening excel?
This is your question, no mention of curupt file. Subject is crashes when macro runs, so i would not know this - no matter what level of attention i paid as you had not said this, but its worth remembering i am truly trying to help not have a go, and so i have some adive that couls help. I feel like i have had my wrist slapped .

hm... well, excel file was corrupted when excel crashed while running a macro (if you paid attention to the subj. you would have noticed that...) and obviously, VB editor itself does not allow excel files to open and neither doees visual studio...

The comments about other platforms answered your question without opening Excel and there you can VBA so thats correct. So im lost at your reaction.

(if you paid attention to the subj. you would have noticed that...) Cant see that in subject or message? so lost there.

However ... if your file is now curupt thats very different, not alwats the fault of Excel Window any version can mis report file and so act as curupt. Best always re-boot this is a Microsoft techi trick from Redmond USA, I am MCSE and thats the best thing as soon as the file jumps as they call it (crashes) if you control ALT Delete to force Excel to close could have issue re opening the file as the header could be damaged ir curupt, so now wont open.

I have a code to back up active sheets every hour as unique files each hour to network drive at home and work just in case, its locked in Auto_Close so i loos very little if this happens. OK i have to delet many file each month but i have many copies of my work, so i can recover. The code i can dit to any time frame, if this would help let me know for future you can add in personal.xls and so will do the same for you to any directory you choose.

Back to the file. What di the macro do, did you script it? Windows has a very nasty if not NT or above of missing the memory acllocations to the PC and so jumps often freezing excel and the PC in general. Close application and try to get excel to pick up.

I use heavy codes that bastch letters and save Excel for ever packs up and i loos data, but i can recover, i save off hundreds a day and print and so on forn a table array Vllokup and all the rest choise of 6 letters to post out.

Resource im comvinced are the main problem, might need to look into that, no matter how much ram you have it a windows problem so the communication to Excel stops.

Now Curupt file are apain and need to find out whats happening when you try to re open, does the file highlight and not open or get error message, if so please can you advise the error message, as there and far to many for many reasons.

Please im only trying to help and give my opinion, im not perfect or always right, but help i will if can. I work hard and enjoy helping people as i do everyday, not just o this borad.

I wish you well and look forward to your responce and hope we can get you up and running very soon

Rdgs
Jack