+ Reply to Thread
Results 1 to 12 of 12

error excel macro 2002/2003

  1. #1
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    error excel macro 2002/2003

    Hello everyone.
    In workbook attached is a macro that works perfectly with Excel 2007, but with Excel 2002/2003 gives error on this point:

    Please Login or Register  to view this content.
    the error is:

    run-time error 1004
    saveas method of the worksheet Failed

    a help?
    Thanks in advance.
    max max
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Gatti's Avatar
    Join Date
    06-08-2015
    Location
    Brasil, São Paulo, Ribeirão Preto
    MS-Off Ver
    365
    Posts
    346

    Re: error excel macro 2002/2003

    Try FileFormat:=xlExcel8

    To get the Excel Version:

    Please Login or Register  to view this content.
    Last edited by Gatti; 06-06-2016 at 12:31 PM.
    If I have solved your question, please mark the thread as [SOLVED],
    And consider adding reputation

    ?Simplicity is the ultimate sophistication? (Leonardo Da Vinci)

    Regards,
    F?bio Gatti

    https://www.youtube.com/pulodogatti
    https://www.linkedin.com/in/fabiocgatti/
    https://instagram.com/pulodogatti

  3. #3
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: error excel macro 2002/2003

    Ciao,

    this
    Try FileFormat:=xlExcel8
    = xls?

    and for xlsx ? (no FileFormat:=51)

    Another thing that

    FileFormat:=xlExcel8

    works on Excel 2003/2002?

    thanks Fabio
    A greeting.
    max_max
    Last edited by max_max; 06-06-2016 at 01:32 PM.

  4. #4
    Valued Forum Contributor Gatti's Avatar
    Join Date
    06-08-2015
    Location
    Brasil, São Paulo, Ribeirão Preto
    MS-Off Ver
    365
    Posts
    346

    Re: error excel macro 2002/2003

    Did it work?

  5. #5
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: error excel macro 2002/2003

    It is here at home with excel 2007

    File Format: = xlExcel8

    work.
    but with excel 2002/2003 work?
    Last edited by max_max; 06-06-2016 at 02:40 PM.

  6. #6
    Valued Forum Contributor Gatti's Avatar
    Join Date
    06-08-2015
    Location
    Brasil, São Paulo, Ribeirão Preto
    MS-Off Ver
    365
    Posts
    346

    Re: error excel macro 2002/2003

    It should do... I don't have installed the V. 2002 or 2003 to try now...
    Please, try it and give me a feedback

  7. #7
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: error excel macro 2002/2003

    Thanks fabio.
    I am attaching the file if someone online would excel 2002 and felt I would be happy.
    max_max
    Attached Files Attached Files

  8. #8
    Valued Forum Contributor Gatti's Avatar
    Join Date
    06-08-2015
    Location
    Brasil, São Paulo, Ribeirão Preto
    MS-Off Ver
    365
    Posts
    346

    Re: error excel macro 2002/2003

    No problems!

    BTW, found the answer in Ron de Bruin's Site:

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693
    Hello
    I tried but it does not work on excel 2002
    I think the error is here:

    wsDest.SaveAs

    not work in excel 2002?

  10. #10
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693
    The advise error is

    run-time error 1004
    saveas method of the workbookFailed

    max_max

  11. #11
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: error excel macro 2002/2003

    Someone understands something?
    max_max

  12. #12
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: error excel macro 2002/2003

    Hi to all.
    With excel 2002:

    run-time error 1004
    saveas method of the worksheet Failed

    'ActiveWorkbook.SaveAs Filename:=sNomeFile, FileFormat:=56 xls
    ActiveWorkbook.SaveAs Filename:=sNomeFile, FileFormat:=xlExcel8

    -----------------------------------------------------------------------------------------------
    no error:

    'wsDest.SaveAs Filename:=sNomeFile '<<< questo O.K.
    ActiveWorkbook.SaveAs Filename:=sNomeFile '<<< questo O.K.

    max_max
    Attached Files Attached Files

+ 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. Printing Macro for Excel 2002 & 2003
    By Constructor10 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-29-2011, 09:24 AM
  2. Macro to convert URL to Images: OK in Excel2007, KO in Excel 2002/2003 !
    By petervaien2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-25-2011, 10:48 AM
  3. Error in Excel 2000, but not 2002 and 2003
    By Ctech in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-03-2006, 07:50 AM
  4. Simple Macro, works in Excel 2002, 2003 but won't work in 2000
    By DJA in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-28-2005, 01:05 PM
  5. Replies: 0
    Last Post: 06-14-2005, 05:05 AM
  6. Excel 2003 Macro Error - Runtime error 1004
    By Cow in forum Excel General
    Replies: 2
    Last Post: 06-07-2005, 09:05 AM
  7. Hide Row macro works in 2002 but not 2003
    By Gooser555 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-18-2005, 10:06 AM
  8. Replies: 6
    Last Post: 01-27-2005, 08:06 PM

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