+ Reply to Thread
Results 1 to 5 of 5

Save As error

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Save As error

    Just switched from 2003 to 2010. The following is my tried and true code for 2003:
    Please Login or Register  to view this content.
    It's failing when I run my macro in a 2010 workbook, saying "Can't Access "Todays Contracts.xls"

    Based on Ron's tips here http://www.rondebruin.nl/saveas.htm I tried to change it like this:
    Please Login or Register  to view this content.
    But this also failed. What am I doing wrong?
    Last edited by jomili; 03-05-2012 at 05:47 PM.

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Save As error

    Please Login or Register  to view this content.



  3. #3
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: Save As error

    Thanks SNB. I assume the rest of my code, following ".fileformat" is correct?

    BTW, turns out my code WAS running correctly. The error was due to the fact that someone else had the "Todays Contracts" workbook open, so the macro couldn't save over it.

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Save As error

    yes it's correct, but redundant and adding nothing. (check the VBEditor's helpfiles, lemma 'saveas' ... )

  5. #5
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: Save As error

    SNB, at first I took exception to your reply, certain that I had no redundant, valueless code. Then I looked at the options coded for, and you're right; in this case the options are redundant, and add no value. That was just some old code I've had for a long time, and copied without analyzing. Thanks for pointing that out.

+ 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