Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default method 'SaveAs' of object '_Workbook' failed

I created a macro where the code has been password protected.
The macro uses the .SaveAs method and the FileFormat argument is set to
xlText.
This combination of the .SaveAs to xlText and the password protecting of the
macro causes it to fail.

Any idea how to get around this. I do not want the users to have access to
the code.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default method 'SaveAs' of object '_Workbook' failed

Kishi,
xlText is a value for the PivotFieldDataType; its value is &HFFFFEFC2.
The values of xlFileFormat that you want to use with .SaveAs are typically:
xlTextMSDOS: &H15
xlTextWindows: &H14

So, fix the value of the file format you are using and see if it helps.

NickHK

P.S. The Object Browser can help you with the arguments/value as well as
showing you which properties/methods/events are available for each object.

xlText is not a valid value
"Kishi" wrote in message
...
I created a macro where the code has been password protected.
The macro uses the .SaveAs method and the FileFormat argument is set to
xlText.
This combination of the .SaveAs to xlText and the password protecting of

the
macro causes it to fail.

Any idea how to get around this. I do not want the users to have access

to
the code.



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
Method 'CheckIn' of object '_workbook' failed Bill Schanks Excel Programming 1 May 9th 06 10:04 PM
Urgent help Runtime error ‘1004’ Method ‘SaveAs’ of object’-Workbook’ failed ????? funkymonkUK[_155_] Excel Programming 4 May 4th 06 12:56 PM
error 1004 Method SaveAs of Workbook failed Maury Markowitz Excel Programming 2 October 25th 05 08:45 PM
_Workbook::SaveAs(...) Fritz Hilgemann Excel Programming 2 June 16th 05 03:39 PM
Error Excel: 1004 SaveAs method of Workbook class failed sebastien Excel Programming 0 August 13th 03 09:59 AM


All times are GMT +1. The time now is 08:39 PM.

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

About Us

"It's about Microsoft Excel"