Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Need help on How to programatically Import VBA Project Excel Objects, Forms, Modules

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Need help on How to programatically Import VBA Project Excel Objects, Forms, Modules

See if you can open the file from Excel: File Open
but hold down the Shift key to prevent the macros from engaging.

Now go to the VBE and comment out all your macros. (providing you
were able to open the file) You can customize the toolbar and add a
'Comment Block' and an 'Uncomment Block' button from the Edit catagory.
This way you can do a Ctrl + A to select all the code in a module and just
click once on the button.

If you were able to get this far - you are halfway there.

Save the workbook and reopen it. (provided ALL the code is commented out.).
Remember to look at all Standard modules, Sheet modules, This-
Workbook module, form modules.

Now things to look for and fix:
Module names, macro names, variable names that use words reserved
by Excel - such as Sum, Cells, Range ..... If unsure, click on the
word
and hit the F1 key. An unreserved word will not result in finding
any
help.
Module names and code names that are the same.
Variables set as Public and also Dimmed in a macro. Use one but not
the other. The easiest way to find these is to find all instances
of
Public in the project and note the variables. Than find all
instances of
Dim or Static and compare what you find.

These are the top 3 reason's that have crashed my Excel.

Recently I had some defined names that used an Offset function to create
self-expanding ranges. For some reason these were causing my Excel to
crash. (Spent several weeks building and rebuilding before I found this)

Also - test your code (macro by macro) in a dummy book before committing
them to your book...

Best of Luck!!! Post back on your progress!!!
--
sb
"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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Need help on How to programatically Import VBA Project Excel Objects, Forms, Modules

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




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

No go Steve. Holding the Shift key while reopening did not alter the result.
I do not have any macros running on startup; there is some problem with
Excel attempting to open the file.
I can create links back to that file to get the contents of every cell -
that means the hard data and the results of formulas, but not the formulas
themselves.
That's why I was thinking that if I could import from that file various
objects, then I could reconstruct the file.
Do you know if that is doable?
Any other suggestions?
Thanks
TTFN
JMMach

"steve" wrote in message
...
See if you can open the file from Excel: File Open
but hold down the Shift key to prevent the macros from engaging.

Now go to the VBE and comment out all your macros. (providing you
were able to open the file) You can customize the toolbar and add a
'Comment Block' and an 'Uncomment Block' button from the Edit catagory.
This way you can do a Ctrl + A to select all the code in a module and just
click once on the button.

If you were able to get this far - you are halfway there.

Save the workbook and reopen it. (provided ALL the code is commented

out.).
Remember to look at all Standard modules, Sheet modules, This-
Workbook module, form modules.

Now things to look for and fix:
Module names, macro names, variable names that use words reserved
by Excel - such as Sum, Cells, Range ..... If unsure, click on

the
word
and hit the F1 key. An unreserved word will not result in finding
any
help.
Module names and code names that are the same.
Variables set as Public and also Dimmed in a macro. Use one but not
the other. The easiest way to find these is to find all instances
of
Public in the project and note the variables. Than find all
instances of
Dim or Static and compare what you find.

These are the top 3 reason's that have crashed my Excel.

Recently I had some defined names that used an Offset function to create
self-expanding ranges. For some reason these were causing my Excel to
crash. (Spent several weeks building and rebuilding before I found this)

Also - test your code (macro by macro) in a dummy book before committing
them to your book...

Best of Luck!!! Post back on your progress!!!
--
sb
"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






  #5   Report Post  
Posted to microsoft.public.excel.programming
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








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Need help on How to programatically Import VBA Project Excel Objects, Forms, Modules

On april 23, 2003, Chip Pearson said:

From: Chip Pearson )
Subject: Errors Occured During load


View this article only
Newsgroups: microsoft.public.excel.programming
Date: 2003-04-23 04:21:54 PST


Will OpenOffice preserve the macro code and forms etc?


Yes, it does.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

I can't find the post, but I believe I recall from a post that you have to
specify something.

As far as I know, you can't work with VBA on a closed file, either importing
or exporting.

Now, if you could program the compound document format, that might not be
correct.

--
Regards,
Tom Ogilvy



JMMach wrote in message
...
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








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

I used StarOffice 6.0 at work to open the troublesome Excel file, and saved
it.
When I opened that file in Excel, I found that the VBA Code was preserved,
and so were the (Group &) Outlines.
The DataValidation was still lost. And a Toggle Button in a spreadsheet was
changed to the Button of the Forms toolbar variety.
So the version of StarOffice does make a difference.
Bottom line: a ton of time was saved & a lot of additional frustration was
averted. Thanks to you!!
It sure would be nice if Microsoft fix that Win2000 "could not be "read"
'bug' or provide a recovery utility for such instances.
--
TTFN
JMMach

"Tom Ogilvy" wrote in message
...
On april 23, 2003, Chip Pearson said:

From: Chip Pearson )
Subject: Errors Occured During load


View this article only
Newsgroups: microsoft.public.excel.programming
Date: 2003-04-23 04:21:54 PST


Will OpenOffice preserve the macro code and forms etc?


Yes, it does.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

I can't find the post, but I believe I recall from a post that you have to
specify something.

As far as I know, you can't work with VBA on a closed file, either

importing
or exporting.

Now, if you could program the compound document format, that might not be
correct.

--
Regards,
Tom Ogilvy



JMMach wrote in message
...
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










  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Need help on How to programatically Import VBA Project Excel Objects, Forms, Modules

Well, they did provide a recovery utility built into Excel in xl2002 (assume
it is still there in xl2003). If you have that at work, you might give that
a whirl as well.

--
Regards,
Tom Ogilvy

"JMMach" wrote in message
...
I used StarOffice 6.0 at work to open the troublesome Excel file, and

saved
it.
When I opened that file in Excel, I found that the VBA Code was preserved,
and so were the (Group &) Outlines.
The DataValidation was still lost. And a Toggle Button in a spreadsheet

was
changed to the Button of the Forms toolbar variety.
So the version of StarOffice does make a difference.
Bottom line: a ton of time was saved & a lot of additional frustration was
averted. Thanks to you!!
It sure would be nice if Microsoft fix that Win2000 "could not be "read"
'bug' or provide a recovery utility for such instances.
--
TTFN
JMMach

"Tom Ogilvy" wrote in message
...
On april 23, 2003, Chip Pearson said:

From: Chip Pearson )
Subject: Errors Occured During load


View this article only
Newsgroups: microsoft.public.excel.programming
Date: 2003-04-23 04:21:54 PST


Will OpenOffice preserve the macro code and forms etc?


Yes, it does.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

I can't find the post, but I believe I recall from a post that you have

to
specify something.

As far as I know, you can't work with VBA on a closed file, either

importing
or exporting.

Now, if you could program the compound document format, that might not

be
correct.

--
Regards,
Tom Ogilvy



JMMach wrote in message
...
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












Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to import modules into a worksheet michaelberrier Excel Discussion (Misc queries) 1 June 4th 06 07:39 PM
Delete Code Modules Programatically blatham Excel Discussion (Misc queries) 1 February 3rd 06 05:38 PM
programatically selecting columns to import text into ScottM Excel Discussion (Misc queries) 2 November 25th 05 05:41 PM
How do I import MS Project data into Excel? mk Excel Discussion (Misc queries) 1 March 30th 05 07:57 PM
How do I import MS Project data into Excel? mk Excel Discussion (Misc queries) 0 March 16th 05 04:23 PM


All times are GMT +1. The time now is 10:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"