+ Reply to Thread
Results 1 to 5 of 5

code is not working on another machine

  1. #1
    Papa Jonah
    Guest

    code is not working on another machine

    I have an excel app with a bunch of vba. It works as expected on my computer
    when loaded on my harddrive or when I run it from a server.
    However, when a coworker runs it from the server, it works to a point. When
    my coworker tries to run another macro, he gets an error "Compile error:
    named argument not found". The debugger highlights "Data option1" within a
    line that sorts some data. It works fine on my computer and when I run it
    from the server.

    Any ideas why this is happening?

    TIA

  2. #2
    Tom Ogilvy
    Guest

    Re: code is not working on another machine

    this person is using an older version of excel that does not recognize that
    argument. You need to remove the argument in the code as it is not
    ususally necessary.

    --
    Regards,
    Tom Ogilvy


    "Papa Jonah" <[email protected]> wrote in message
    news:[email protected]...
    > I have an excel app with a bunch of vba. It works as expected on my

    computer
    > when loaded on my harddrive or when I run it from a server.
    > However, when a coworker runs it from the server, it works to a point.

    When
    > my coworker tries to run another macro, he gets an error "Compile error:
    > named argument not found". The debugger highlights "Data option1" within

    a
    > line that sorts some data. It works fine on my computer and when I run it
    > from the server.
    >
    > Any ideas why this is happening?
    >
    > TIA




  3. #3
    Papa Jonah
    Guest

    Re: code is not working on another machine

    Tom,
    The statement is:
    pareto.Sort Key1:=Range("AA2"), Order1:=xlDescending, Key2:=Range( _
    "AC2"), Order2:=xlDescending, Header:=xlGuess, OrderCustom:=1,
    MatchCase _
    :=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, _
    DataOption2:=xlSortNormal

    Why is this not necessary?
    Also, I just learned that another coworker, who is running the same version
    of excel (with same service packs) is having a problem at another spot in the
    code. A spot that the first coworker, with the older version of excel, does
    not have a problem with.



    "Tom Ogilvy" wrote:

    > this person is using an older version of excel that does not recognize that
    > argument. You need to remove the argument in the code as it is not
    > ususally necessary.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "Papa Jonah" <[email protected]> wrote in message
    > news:[email protected]...
    > > I have an excel app with a bunch of vba. It works as expected on my

    > computer
    > > when loaded on my harddrive or when I run it from a server.
    > > However, when a coworker runs it from the server, it works to a point.

    > When
    > > my coworker tries to run another macro, he gets an error "Compile error:
    > > named argument not found". The debugger highlights "Data option1" within

    > a
    > > line that sorts some data. It works fine on my computer and when I run it
    > > from the server.
    > >
    > > Any ideas why this is happening?
    > >
    > > TIA

    >
    >
    >


  4. #4
    Tom Ogilvy
    Guest

    Re: code is not working on another machine

    because xlSortNormal is the default. You don't need to specify it since it
    is the default.

    As I said, this option wasn't even available in older versions of excel.

    Anyway, these options allow you to specify how to sort the data under each
    sort key - treat it as number or treat it as text.

    On the second situation.
    If it is a library not found error, then you need to check the references on
    that machine (in the VBE) after the error and see if any are Marked as
    MISSING.

    --
    Regards,
    Tom Ogilvy

    "Papa Jonah" <[email protected]> wrote in message
    news:[email protected]...
    > Tom,
    > The statement is:
    > pareto.Sort Key1:=Range("AA2"), Order1:=xlDescending, Key2:=Range( _
    > "AC2"), Order2:=xlDescending, Header:=xlGuess, OrderCustom:=1,
    > MatchCase _
    > :=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, _
    > DataOption2:=xlSortNormal
    >
    > Why is this not necessary?
    > Also, I just learned that another coworker, who is running the same

    version
    > of excel (with same service packs) is having a problem at another spot in

    the
    > code. A spot that the first coworker, with the older version of excel,

    does
    > not have a problem with.
    >
    >
    >
    > "Tom Ogilvy" wrote:
    >
    > > this person is using an older version of excel that does not recognize

    that
    > > argument. You need to remove the argument in the code as it is not
    > > ususally necessary.
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > >
    > > "Papa Jonah" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > I have an excel app with a bunch of vba. It works as expected on my

    > > computer
    > > > when loaded on my harddrive or when I run it from a server.
    > > > However, when a coworker runs it from the server, it works to a point.

    > > When
    > > > my coworker tries to run another macro, he gets an error "Compile

    error:
    > > > named argument not found". The debugger highlights "Data option1"

    within
    > > a
    > > > line that sorts some data. It works fine on my computer and when I

    run it
    > > > from the server.
    > > >
    > > > Any ideas why this is happening?
    > > >
    > > > TIA

    > >
    > >
    > >




  5. #5
    Papa Jonah
    Guest

    Re: code is not working on another machine

    Thank you Tom.
    I understand now.

    "Tom Ogilvy" wrote:

    > because xlSortNormal is the default. You don't need to specify it since it
    > is the default.
    >
    > As I said, this option wasn't even available in older versions of excel.
    >
    > Anyway, these options allow you to specify how to sort the data under each
    > sort key - treat it as number or treat it as text.
    >
    > On the second situation.
    > If it is a library not found error, then you need to check the references on
    > that machine (in the VBE) after the error and see if any are Marked as
    > MISSING.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "Papa Jonah" <[email protected]> wrote in message
    > news:[email protected]...
    > > Tom,
    > > The statement is:
    > > pareto.Sort Key1:=Range("AA2"), Order1:=xlDescending, Key2:=Range( _
    > > "AC2"), Order2:=xlDescending, Header:=xlGuess, OrderCustom:=1,
    > > MatchCase _
    > > :=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, _
    > > DataOption2:=xlSortNormal
    > >
    > > Why is this not necessary?
    > > Also, I just learned that another coworker, who is running the same

    > version
    > > of excel (with same service packs) is having a problem at another spot in

    > the
    > > code. A spot that the first coworker, with the older version of excel,

    > does
    > > not have a problem with.
    > >
    > >
    > >
    > > "Tom Ogilvy" wrote:
    > >
    > > > this person is using an older version of excel that does not recognize

    > that
    > > > argument. You need to remove the argument in the code as it is not
    > > > ususally necessary.
    > > >
    > > > --
    > > > Regards,
    > > > Tom Ogilvy
    > > >
    > > >
    > > > "Papa Jonah" <[email protected]> wrote in message
    > > > news:[email protected]...
    > > > > I have an excel app with a bunch of vba. It works as expected on my
    > > > computer
    > > > > when loaded on my harddrive or when I run it from a server.
    > > > > However, when a coworker runs it from the server, it works to a point.
    > > > When
    > > > > my coworker tries to run another macro, he gets an error "Compile

    > error:
    > > > > named argument not found". The debugger highlights "Data option1"

    > within
    > > > a
    > > > > line that sorts some data. It works fine on my computer and when I

    > run it
    > > > > from the server.
    > > > >
    > > > > Any ideas why this is happening?
    > > > >
    > > > > TIA
    > > >
    > > >
    > > >

    >
    >
    >


+ 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