+ Reply to Thread
Results 1 to 2 of 2

ActiveWorkbook.ActiveSheet.SaveAs

  1. #1
    Registered User
    Join Date
    09-15-2016
    Location
    Ontario, Canada
    MS-Off Ver
    2010
    Posts
    1

    ActiveWorkbook.ActiveSheet.SaveAs

    I worked very hard and listened to many videos on Youtube to create my first PO-Template last year. It saves a copy of the PO in .pdf format & in Excel format, saves the PO with the PO #, etc. Everything was fine until now. I am trying to recreate the same thing for an InvoiceTemplate and it gives me an error at line 1004. I cannot see the problem. It still works for the original one. I do not master VBA well enough to repair what has changed. P.S. I have not figured out how to print the PO or Invoice before re-saving the InvoiceTemplate in .xlsm.

    Here is my code:
    Please Login or Register  to view this content.
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Last edited by 6StringJazzer; 09-15-2016 at 07:57 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,866

    Re: ActiveWorkbook.ActiveSheet.SaveAs

    1004 is not the line number, it is an error code. When the error occurs, you get a dialog box. Press Debug. Then tell us which line of code is shown highlighted in yellow; that's where the error occurs and the code stops.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Activeworkbook.SaveAs
    By SriramDorai in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-12-2014, 05:08 AM
  2. ActiveWorkBook.SaveAs - Not Working
    By kjsconv in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-08-2013, 12:32 PM
  3. copy to activeworkbook activesheet - failed...
    By Armitage2k in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-06-2011, 10:58 AM
  4. ActiveWorkbook.SaveAs
    By Bhawxfan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-28-2010, 12:00 PM
  5. ActiveWorkbook.SaveAs
    By fmardani in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-25-2008, 04:45 AM
  6. Activeworkbook.saveas question
    By MGT2000 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-24-2008, 02:29 PM
  7. 'ActiveWorkbook.SaveAs Filename'
    By TOMB in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-15-2005, 08:07 PM
  8. ActiveWorkbook SaveAs
    By Mike in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-11-2005, 12:06 AM

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