+ Reply to Thread
Results 1 to 6 of 6

Run-time error 1004 with sort

  1. #1
    Linking to specific cells in pivot table
    Guest

    Run-time error 1004 with sort

    Hi,

    The code below works fine on my computer which has Excel 2003 but is coming
    up with a Run-Time error 1004 on my client's computer which has Excel 2000.
    The actual line being highlighted by Debug is surrounded by << >> below. Any
    help is appreciated! Also, is it possible to have Excel 2003 operate in
    Excel 2000 mode? I ask because I have a lot of macros going on this
    spreadsheet and I suspect there may be more of these types of errors in the
    code with 2000 and would like for me to catch all the errors, not my client.

    Range("I15:L34").Select
    <<Selection.Sort Key1:=Range("I15"), Order1:=xlAscending, Header:=xlGuess, _>>
    OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
    DataOption1:=xlSortNormal


    Thanks!

    Robert

  2. #2
    Chip Pearson
    Guest

    Re: Run-time error 1004 with sort

    I believe that the DataOption1 argument is not available in Excel
    2000.

    No, there is no way to have Excel 2003 operate in 2000 mode. You
    need to develop for the oldest version that your workbook will be
    used on.


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "Linking to specific cells in pivot table"
    <[email protected]>
    wrote in message
    news:[email protected]...
    > Hi,
    >
    > The code below works fine on my computer which has Excel 2003
    > but is coming
    > up with a Run-Time error 1004 on my client's computer which has
    > Excel 2000.
    > The actual line being highlighted by Debug is surrounded by <<
    > >> below. Any

    > help is appreciated! Also, is it possible to have Excel 2003
    > operate in
    > Excel 2000 mode? I ask because I have a lot of macros going on
    > this
    > spreadsheet and I suspect there may be more of these types of
    > errors in the
    > code with 2000 and would like for me to catch all the errors,
    > not my client.
    >
    > Range("I15:L34").Select
    > <<Selection.Sort Key1:=Range("I15"), Order1:=xlAscending,
    > Header:=xlGuess, _>>
    > OrderCustom:=1, MatchCase:=False,
    > Orientation:=xlTopToBottom, _
    > DataOption1:=xlSortNormal
    >
    >
    > Thanks!
    >
    > Robert




  3. #3
    Jim Thomlinson
    Guest

    Re: Run-time error 1004 with sort

    Thanks Chip you are absolutely correct... I will have to remember that for
    the future... You just don't miss much.
    --
    HTH...

    Jim Thomlinson


    "Chip Pearson" wrote:

    > I believe that the DataOption1 argument is not available in Excel
    > 2000.
    >
    > No, there is no way to have Excel 2003 operate in 2000 mode. You
    > need to develop for the oldest version that your workbook will be
    > used on.
    >
    >
    > --
    > Cordially,
    > Chip Pearson
    > Microsoft MVP - Excel
    > Pearson Software Consulting, LLC
    > www.cpearson.com
    >
    >
    > "Linking to specific cells in pivot table"
    > <[email protected]>
    > wrote in message
    > news:[email protected]...
    > > Hi,
    > >
    > > The code below works fine on my computer which has Excel 2003
    > > but is coming
    > > up with a Run-Time error 1004 on my client's computer which has
    > > Excel 2000.
    > > The actual line being highlighted by Debug is surrounded by <<
    > > >> below. Any

    > > help is appreciated! Also, is it possible to have Excel 2003
    > > operate in
    > > Excel 2000 mode? I ask because I have a lot of macros going on
    > > this
    > > spreadsheet and I suspect there may be more of these types of
    > > errors in the
    > > code with 2000 and would like for me to catch all the errors,
    > > not my client.
    > >
    > > Range("I15:L34").Select
    > > <<Selection.Sort Key1:=Range("I15"), Order1:=xlAscending,
    > > Header:=xlGuess, _>>
    > > OrderCustom:=1, MatchCase:=False,
    > > Orientation:=xlTopToBottom, _
    > > DataOption1:=xlSortNormal
    > >
    > >
    > > Thanks!
    > >
    > > Robert

    >
    >
    >


  4. #4
    Linking to specific cells in pivot table
    Guest

    Re: Run-time error 1004 with sort

    Thanks for the info - I'm still wondering though how I should change my code
    then so it will work on Excel 2000...any suggestions are very much
    appreciated!

    Robert

    "Jim Thomlinson" wrote:

    > Thanks Chip you are absolutely correct... I will have to remember that for
    > the future... You just don't miss much.
    > --
    > HTH...
    >
    > Jim Thomlinson
    >
    >
    > "Chip Pearson" wrote:
    >
    > > I believe that the DataOption1 argument is not available in Excel
    > > 2000.
    > >
    > > No, there is no way to have Excel 2003 operate in 2000 mode. You
    > > need to develop for the oldest version that your workbook will be
    > > used on.
    > >
    > >
    > > --
    > > Cordially,
    > > Chip Pearson
    > > Microsoft MVP - Excel
    > > Pearson Software Consulting, LLC
    > > www.cpearson.com
    > >
    > >
    > > "Linking to specific cells in pivot table"
    > > <[email protected]>
    > > wrote in message
    > > news:[email protected]...
    > > > Hi,
    > > >
    > > > The code below works fine on my computer which has Excel 2003
    > > > but is coming
    > > > up with a Run-Time error 1004 on my client's computer which has
    > > > Excel 2000.
    > > > The actual line being highlighted by Debug is surrounded by <<
    > > > >> below. Any
    > > > help is appreciated! Also, is it possible to have Excel 2003
    > > > operate in
    > > > Excel 2000 mode? I ask because I have a lot of macros going on
    > > > this
    > > > spreadsheet and I suspect there may be more of these types of
    > > > errors in the
    > > > code with 2000 and would like for me to catch all the errors,
    > > > not my client.
    > > >
    > > > Range("I15:L34").Select
    > > > <<Selection.Sort Key1:=Range("I15"), Order1:=xlAscending,
    > > > Header:=xlGuess, _>>
    > > > OrderCustom:=1, MatchCase:=False,
    > > > Orientation:=xlTopToBottom, _
    > > > DataOption1:=xlSortNormal
    > > >
    > > >
    > > > Thanks!
    > > >
    > > > Robert

    > >
    > >
    > >


  5. #5
    Jim Thomlinson
    Guest

    Re: Run-time error 1004 with sort

    There are not that terribly many changes that you will need to make. Pivot
    tables are a fair bit different and I do know that there are a few more
    alerts (for example find and replace throws an alert if nothing is found to
    replace in 2003). You really need to get a hold of a copy of 2000 and test
    your stuff.
    --
    HTH...

    Jim Thomlinson


    "Linking to specific cells in pivot table" wrote:

    > Thanks for the info - I'm still wondering though how I should change my code
    > then so it will work on Excel 2000...any suggestions are very much
    > appreciated!
    >
    > Robert
    >
    > "Jim Thomlinson" wrote:
    >
    > > Thanks Chip you are absolutely correct... I will have to remember that for
    > > the future... You just don't miss much.
    > > --
    > > HTH...
    > >
    > > Jim Thomlinson
    > >
    > >
    > > "Chip Pearson" wrote:
    > >
    > > > I believe that the DataOption1 argument is not available in Excel
    > > > 2000.
    > > >
    > > > No, there is no way to have Excel 2003 operate in 2000 mode. You
    > > > need to develop for the oldest version that your workbook will be
    > > > used on.
    > > >
    > > >
    > > > --
    > > > Cordially,
    > > > Chip Pearson
    > > > Microsoft MVP - Excel
    > > > Pearson Software Consulting, LLC
    > > > www.cpearson.com
    > > >
    > > >
    > > > "Linking to specific cells in pivot table"
    > > > <[email protected]>
    > > > wrote in message
    > > > news:[email protected]...
    > > > > Hi,
    > > > >
    > > > > The code below works fine on my computer which has Excel 2003
    > > > > but is coming
    > > > > up with a Run-Time error 1004 on my client's computer which has
    > > > > Excel 2000.
    > > > > The actual line being highlighted by Debug is surrounded by <<
    > > > > >> below. Any
    > > > > help is appreciated! Also, is it possible to have Excel 2003
    > > > > operate in
    > > > > Excel 2000 mode? I ask because I have a lot of macros going on
    > > > > this
    > > > > spreadsheet and I suspect there may be more of these types of
    > > > > errors in the
    > > > > code with 2000 and would like for me to catch all the errors,
    > > > > not my client.
    > > > >
    > > > > Range("I15:L34").Select
    > > > > <<Selection.Sort Key1:=Range("I15"), Order1:=xlAscending,
    > > > > Header:=xlGuess, _>>
    > > > > OrderCustom:=1, MatchCase:=False,
    > > > > Orientation:=xlTopToBottom, _
    > > > > DataOption1:=xlSortNormal
    > > > >
    > > > >
    > > > > Thanks!
    > > > >
    > > > > Robert
    > > >
    > > >
    > > >


  6. #6
    Dave Peterson
    Guest

    Re: Run-time error 1004 with sort

    For this specific problem, remove:
    DataOption1:=xlSortNormal
    (and the previous comma and associated line continuation character)

    In general????

    Bring that workbook to a pc that has xl2k. Test the heck out of it.





    Linking to specific cells in pivot table wrote:
    >
    > Thanks for the info - I'm still wondering though how I should change my code
    > then so it will work on Excel 2000...any suggestions are very much
    > appreciated!
    >
    > Robert
    >
    > "Jim Thomlinson" wrote:
    >
    > > Thanks Chip you are absolutely correct... I will have to remember that for
    > > the future... You just don't miss much.
    > > --
    > > HTH...
    > >
    > > Jim Thomlinson
    > >
    > >
    > > "Chip Pearson" wrote:
    > >
    > > > I believe that the DataOption1 argument is not available in Excel
    > > > 2000.
    > > >
    > > > No, there is no way to have Excel 2003 operate in 2000 mode. You
    > > > need to develop for the oldest version that your workbook will be
    > > > used on.
    > > >
    > > >
    > > > --
    > > > Cordially,
    > > > Chip Pearson
    > > > Microsoft MVP - Excel
    > > > Pearson Software Consulting, LLC
    > > > www.cpearson.com
    > > >
    > > >
    > > > "Linking to specific cells in pivot table"
    > > > <[email protected]>
    > > > wrote in message
    > > > news:[email protected]...
    > > > > Hi,
    > > > >
    > > > > The code below works fine on my computer which has Excel 2003
    > > > > but is coming
    > > > > up with a Run-Time error 1004 on my client's computer which has
    > > > > Excel 2000.
    > > > > The actual line being highlighted by Debug is surrounded by <<
    > > > > >> below. Any
    > > > > help is appreciated! Also, is it possible to have Excel 2003
    > > > > operate in
    > > > > Excel 2000 mode? I ask because I have a lot of macros going on
    > > > > this
    > > > > spreadsheet and I suspect there may be more of these types of
    > > > > errors in the
    > > > > code with 2000 and would like for me to catch all the errors,
    > > > > not my client.
    > > > >
    > > > > Range("I15:L34").Select
    > > > > <<Selection.Sort Key1:=Range("I15"), Order1:=xlAscending,
    > > > > Header:=xlGuess, _>>
    > > > > OrderCustom:=1, MatchCase:=False,
    > > > > Orientation:=xlTopToBottom, _
    > > > > DataOption1:=xlSortNormal
    > > > >
    > > > >
    > > > > Thanks!
    > > > >
    > > > > Robert
    > > >
    > > >
    > > >


    --

    Dave Peterson

+ 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