+ Reply to Thread
Results 1 to 2 of 2

method 'SaveAs' of object '_Workbook' failed

  1. #1
    Kishi
    Guest

    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. #2
    NickHK
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1