View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JMMach JMMach is offline
external usenet poster
 
Posts: 9
Default Need help on How to programatically Import VBA Project Excel Objects, Forms, Modules

Thanks Tom, that worked ... partially!
I was able to open the file with StarOffice 5.2 spreadsheet, and save it
again in Excel'97 format.
Then I was able to open the file with Excel 2000.
What I recovered where the following:
spreadsheets & formulas
UserForms in VBE
What I lost were the following:
DataValidation in the spreadsheets
VBA code behind the UserForm
All the VBA Modules
So the lesson here is to export the Modules and Userforms because they can
be so easily imported again.
Is it possible that the DataValidation is causing the files to become
corrupted?
Do you know if there is a way programatically to import the VBA project
Excel Objects, Forms, and Modules without having to formally open the file?
Is that do-able?

TTFN
JMMach

"Tom Ogilvy" wrote in message
...
Some have suggested using Open Office (formerly Star Office). It is a

free
(though large) download and I have seen it stated that it will preserve

the
VBA (although I haven't tried it myself).

--
Regards,
Tom Ogilvy

JMMach wrote in message
...
I have an Excel 2000 workbook that I have worked on for two days.
There was no indication that there was any problem when saving. And I

made
a
backup copy.
Problem is this:
When I try to open the file now it will not open, and
Windows 2000 gives the following error message:
"
EXCEL.EXE - Application Error
The instruction at "0x3004c359" referenced memory at "0x00bc1384". The
memory could not be "read".
Click on OK to terminate the program
Click on Cancel to debug the program
"
I click on OK and the program crashes.
Same thing with my backup copy.

This is the second time it has happened with this file, and I've had to
recreate it. I do not know what is the cause of this problem.
Is there a way programatically to import the VBA project Excel Objects,
Forms, and Modules without having to formally open the file?
I'm hoping that the file contents can be accessed much like linking is

able
to access the contents without formally opening the file.
So I'm thinking that if I can successfully import one object at a time,

I
will be able to recover a lot of my work, and save a bunch of time, and
perhaps isolate where the problem is coming from.
I'm also open to any other suggestions someone might have.
Thanks in advance
--
TTFN
JMMach