ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   CorruptLoad param of Workbooks.Open (https://www.excelbanter.com/excel-programming/295400-corruptload-param-workbooks-open.html)

Microsoft

CorruptLoad param of Workbooks.Open
 
I have a VB app that opens an excel workbook, makes some modifications /
additions, and then saves / closes the workbook. It was working fine until I
upgraded to Excel 2003. Now attempting to open the workbook results in an
[color blue]Error 1004 - Method 'Open' of object 'Workbooks' failed[/color].
I've determined that the issue is an invalid Worksheet name, so I added the
CorruptLoad:=xlRepairFile parameter to my Workbooks.Open
instruction. Excel now repairs the worksheet name on open, however now I get
a confirmation dialog box that asks if I want to save the repaired file.
Is there any way to open the workbook, repair/correct the worksheet name,
and continue on making my changes without showing any dialog boxes?
Thanks for your help!
Charlton



Tom Ogilvy

CorruptLoad param of Workbooks.Open
 
You can try

application.DisplayAlerts = False
' open the workbook
application.DisplayAlerts = True

don't know if it will suppress this prompt or not AND if it suppresses the
message, whether it will save or not.

--
Regards,
Tom Ogilvy

"Microsoft" wrote in message
...
I have a VB app that opens an excel workbook, makes some modifications /
additions, and then saves / closes the workbook. It was working fine until

I
upgraded to Excel 2003. Now attempting to open the workbook results in an
[color blue]Error 1004 - Method 'Open' of object 'Workbooks'

failed[/color].
I've determined that the issue is an invalid Worksheet name, so I added

the
CorruptLoad:=xlRepairFile parameter to my Workbooks.Open
instruction. Excel now repairs the worksheet name on open, however now I

get
a confirmation dialog box that asks if I want to save the repaired file.
Is there any way to open the workbook, repair/correct the worksheet name,
and continue on making my changes without showing any dialog boxes?
Thanks for your help!
Charlton





Microsoft

CorruptLoad param of Workbooks.Open
 
Thanks for your swift reply.
I've tried DisplayAlerts but the dialog box still opens.
Any other suggestions?

Thanks!

"Tom Ogilvy" wrote in message
...
You can try

application.DisplayAlerts = False
' open the workbook
application.DisplayAlerts = True

don't know if it will suppress this prompt or not AND if it suppresses the
message, whether it will save or not.

--
Regards,
Tom Ogilvy

"Microsoft" wrote in message
...
I have a VB app that opens an excel workbook, makes some modifications /
additions, and then saves / closes the workbook. It was working fine

until
I
upgraded to Excel 2003. Now attempting to open the workbook results in

an
[color blue]Error 1004 - Method 'Open' of object 'Workbooks'

failed
.
I've determined that the issue is an invalid Worksheet name, so I added

the
CorruptLoad:=xlRepairFile parameter to my Workbooks.Open
instruction. Excel now repairs the worksheet name on open, however now I

get
a confirmation dialog box that asks if I want to save the repaired file.
Is there any way to open the workbook, repair/correct the worksheet
[/color]
name,
and continue on making my changes without showing any dialog boxes?
Thanks for your help!
Charlton







Tom Ogilvy

CorruptLoad param of Workbooks.Open
 
That is the only command that suppresses warning messages (that I am aware
of) - but apparently this message doesn't fall in the category of messages
it will suppress.

Why not just fix the workbook one time and be done with it?

--
Regards,
Tom Ogilvy

"Microsoft" wrote in message
...
Thanks for your swift reply.
I've tried DisplayAlerts but the dialog box still opens.
Any other suggestions?

Thanks!

"Tom Ogilvy" wrote in message
...
You can try

application.DisplayAlerts = False
' open the workbook
application.DisplayAlerts = True

don't know if it will suppress this prompt or not AND if it suppresses

the
message, whether it will save or not.

--
Regards,
Tom Ogilvy

"Microsoft" wrote in message
...
I have a VB app that opens an excel workbook, makes some modifications

/
additions, and then saves / closes the workbook. It was working fine

until
I
upgraded to Excel 2003. Now attempting to open the workbook results in

an
[color blue]Error 1004 - Method 'Open' of object 'Workbooks'

failed
.
I've determined that the issue is an invalid Worksheet name, so I
[/color]
added
the
CorruptLoad:=xlRepairFile parameter to my Workbooks.Open
instruction. Excel now repairs the worksheet name on open, however now

I
get
a confirmation dialog box that asks if I want to save the repaired

file.
Is there any way to open the workbook, repair/correct the worksheet

name,
and continue on making my changes without showing any dialog boxes?
Thanks for your help!
Charlton









Microsoft

CorruptLoad param of Workbooks.Open
 
The workbook is re-created on a daily basis, so I can't just fix it once- It
has to be fixed every day. (It is the product of another program's "export"
facility.) My app just makes the necessary changes to the workbook and then
emails it out.
Maybe there's another way around it...
Thanks again for your help!

"Tom Ogilvy" wrote in message
...
That is the only command that suppresses warning messages (that I am aware
of) - but apparently this message doesn't fall in the category of messages
it will suppress.

Why not just fix the workbook one time and be done with it?

--
Regards,
Tom Ogilvy

"Microsoft" wrote in message
...
Thanks for your swift reply.
I've tried DisplayAlerts but the dialog box still opens.
Any other suggestions?

Thanks!

"Tom Ogilvy" wrote in message
...
You can try

application.DisplayAlerts = False
' open the workbook
application.DisplayAlerts = True

don't know if it will suppress this prompt or not AND if it suppresses

the
message, whether it will save or not.

--
Regards,
Tom Ogilvy

"Microsoft" wrote in message
...
I have a VB app that opens an excel workbook, makes some

modifications
/
additions, and then saves / closes the workbook. It was working fine

until
I
upgraded to Excel 2003. Now attempting to open the workbook results

in
an
[color blue]Error 1004 - Method 'Open' of object 'Workbooks'
failed
.
I've determined that the issue is an invalid Worksheet name, so I

added
the
CorruptLoad:=xlRepairFile parameter to my
[/color]
Workbooks.Open
instruction. Excel now repairs the worksheet name on open, however

now
I
get
a confirmation dialog box that asks if I want to save the repaired

file.
Is there any way to open the workbook, repair/correct the worksheet

name,
and continue on making my changes without showing any dialog boxes?
Thanks for your help!
Charlton











count

CorruptLoad param of Workbooks.Open
 
I'm not sure but it resembles my problem with 2003:
I used Named Ranges and my gradual development I kept, using SavingAs
....TheNameXX.xls with XX incrementing every so often.
All was well until I deleted early versions of XX.
Then Named Ranges couldn't be found and I had to delete / readd all of them.
Also macros assigned to buttons remembered older versions too. Horror.
The cure was in Options: I cleared the check mark Store External Links
[forgive inaccurate translation of the Option - I'm working with Polish
version at the moment and forgot original wording]. I also cleared other
check marks so...
....at this point I think it's time for knowledgable people to step in :)
Tom!, Bob!, Frank! - overhere!
Regards,
Paul
P.S. Ehem, ...about your nick...

Użytkownik "Microsoft" napisał w wiadomości
...
The workbook is re-created on a daily basis, so I can't just fix it once-

It
has to be fixed every day. (It is the product of another program's

"export"
facility.) My app just makes the necessary changes to the workbook and

then
emails it out.
Maybe there's another way around it...
Thanks again for your help!

"Tom Ogilvy" wrote in message
...
That is the only command that suppresses warning messages (that I am

aware
of) - but apparently this message doesn't fall in the category of

messages
it will suppress.

Why not just fix the workbook one time and be done with it?

--
Regards,
Tom Ogilvy

"Microsoft" wrote in message
...
Thanks for your swift reply.
I've tried DisplayAlerts but the dialog box still opens.
Any other suggestions?

Thanks!

"Tom Ogilvy" wrote in message
...
You can try

application.DisplayAlerts = False
' open the workbook
application.DisplayAlerts = True

don't know if it will suppress this prompt or not AND if it

suppresses
the
message, whether it will save or not.

--
Regards,
Tom Ogilvy

"Microsoft" wrote in message
...
I have a VB app that opens an excel workbook, makes some

modifications
/
additions, and then saves / closes the workbook. It was working

fine
until
I
upgraded to Excel 2003. Now attempting to open the workbook

results
in
an
[color blue]Error 1004 - Method 'Open' of object 'Workbooks'
failed
.
I've determined that the issue is an invalid Worksheet name, so I

added
the
CorruptLoad:=xlRepairFile parameter to my

Workbooks.Open
instruction. Excel now repairs the worksheet name on open, however

now
I
get
a confirmation dialog box that asks if I want to save the repaired

file.
Is there any way to open the workbook, repair/correct the
[/color]
worksheet
name,
and continue on making my changes without showing any dialog

boxes?
Thanks for your help!
Charlton













Dave Peterson[_3_]

CorruptLoad param of Workbooks.Open
 
if you've been really good, maybe you could use Sendkeys and send an escape (or
whatever you need to dismiss that dialog).

But if you're unlucky, your sendkeys could go to a different application and
hose that one up.



Microsoft wrote:

The workbook is re-created on a daily basis, so I can't just fix it once- It
has to be fixed every day. (It is the product of another program's "export"
facility.) My app just makes the necessary changes to the workbook and then
emails it out.
Maybe there's another way around it...
Thanks again for your help!

"Tom Ogilvy" wrote in message
...
That is the only command that suppresses warning messages (that I am aware
of) - but apparently this message doesn't fall in the category of messages
it will suppress.

Why not just fix the workbook one time and be done with it?

--
Regards,
Tom Ogilvy

"Microsoft" wrote in message
...
Thanks for your swift reply.
I've tried DisplayAlerts but the dialog box still opens.
Any other suggestions?

Thanks!

"Tom Ogilvy" wrote in message
...
You can try

application.DisplayAlerts = False
' open the workbook
application.DisplayAlerts = True

don't know if it will suppress this prompt or not AND if it suppresses

the
message, whether it will save or not.

--
Regards,
Tom Ogilvy

"Microsoft" wrote in message
...
I have a VB app that opens an excel workbook, makes some

modifications
/
additions, and then saves / closes the workbook. It was working fine
until
I
upgraded to Excel 2003. Now attempting to open the workbook results

in
an
[color blue]Error 1004 - Method 'Open' of object 'Workbooks'
failed
.
I've determined that the issue is an invalid Worksheet name, so I

added
the
CorruptLoad:=xlRepairFile parameter to my

Workbooks.Open
instruction. Excel now repairs the worksheet name on open, however

now
I
get
a confirmation dialog box that asks if I want to save the repaired

file.
Is there any way to open the workbook, repair/correct the worksheet
name,
and continue on making my changes without showing any dialog boxes?
Thanks for your help!
Charlton







[/color]

--

Dave Peterson



All times are GMT +1. The time now is 07:38 PM.

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