+ Reply to Thread
Results 1 to 4 of 4

running a macro on a different operating system

  1. #1
    Jez
    Guest

    running a macro on a different operating system

    Hi,

    I'm new to programming in VBA. I just finished my first real project.
    I automated some processes in a sales worksheet for my old employer. I
    worked on this macro at home using my Excel 2003 on Windows XP.
    However, my employer's systems are still on Windows 2000 and Office
    2000. Some parts of the macro work great, but I get some silly errors.
    For instance, the command "application.goto := "myrange" is not
    recognized as a valid command. However, in another portion of the
    macro, this same command works! Is this just version related, or is
    there something else I can try? I would appreciate the help.


  2. #2
    Dave Peterson
    Guest

    Re: running a macro on a different operating system

    I think the line you included in your post would fail in all versions of
    excel--but I bet that it's a typo in the post.

    You may want to copy directly from your code and paste into your message--just
    to make sure what you post is what you meant.



    Jez wrote:
    >
    > Hi,
    >
    > I'm new to programming in VBA. I just finished my first real project.
    > I automated some processes in a sales worksheet for my old employer. I
    > worked on this macro at home using my Excel 2003 on Windows XP.
    > However, my employer's systems are still on Windows 2000 and Office
    > 2000. Some parts of the macro work great, but I get some silly errors.
    > For instance, the command "application.goto := "myrange" is not
    > recognized as a valid command. However, in another portion of the
    > macro, this same command works! Is this just version related, or is
    > there something else I can try? I would appreciate the help.


    --

    Dave Peterson

  3. #3
    Jez
    Guest

    Re: running a macro on a different operating system

    Yes, I guess I didn't check before copying it.

    The line I'm referring to is this:

    Application.Goto Reference:="ColonneMoyenne"

    Interestingly, in one section of the macro, this reference works well,
    but in another, it doesn't at all. I get a 1004 error.



    Dave Peterson wrote:
    > I think the line you included in your post would fail in all versions of
    > excel--but I bet that it's a typo in the post.
    >
    > You may want to copy directly from your code and paste into your message--just
    > to make sure what you post is what you meant.
    >
    >
    >
    > Jez wrote:
    > >
    > > Hi,
    > >
    > > I'm new to programming in VBA. I just finished my first real project.
    > > I automated some processes in a sales worksheet for my old employer. I
    > > worked on this macro at home using my Excel 2003 on Windows XP.
    > > However, my employer's systems are still on Windows 2000 and Office
    > > 2000. Some parts of the macro work great, but I get some silly errors.
    > > For instance, the command "application.goto := "myrange" is not
    > > recognized as a valid command. However, in another portion of the
    > > macro, this same command works! Is this just version related, or is
    > > there something else I can try? I would appreciate the help.

    >
    > --
    >
    > Dave Peterson



  4. #4
    Dave Peterson
    Guest

    Re: running a macro on a different operating system

    Any chance that your code changed the active workbook?
    That could cause the error.

    Maybe something like this would fix it:

    Application.Goto _
    reference:=Workbooks("book3.xls").Names("asdfasdf").RefersToRange

    Or any chance you deleted that range name.

    Jez wrote:
    >
    > Yes, I guess I didn't check before copying it.
    >
    > The line I'm referring to is this:
    >
    > Application.Goto Reference:="ColonneMoyenne"
    >
    > Interestingly, in one section of the macro, this reference works well,
    > but in another, it doesn't at all. I get a 1004 error.
    >
    > Dave Peterson wrote:
    > > I think the line you included in your post would fail in all versions of
    > > excel--but I bet that it's a typo in the post.
    > >
    > > You may want to copy directly from your code and paste into your message--just
    > > to make sure what you post is what you meant.
    > >
    > >
    > >
    > > Jez wrote:
    > > >
    > > > Hi,
    > > >
    > > > I'm new to programming in VBA. I just finished my first real project.
    > > > I automated some processes in a sales worksheet for my old employer. I
    > > > worked on this macro at home using my Excel 2003 on Windows XP.
    > > > However, my employer's systems are still on Windows 2000 and Office
    > > > 2000. Some parts of the macro work great, but I get some silly errors.
    > > > For instance, the command "application.goto := "myrange" is not
    > > > recognized as a valid command. However, in another portion of the
    > > > macro, this same command works! Is this just version related, or is
    > > > there something else I can try? I would appreciate the help.

    > >
    > > --
    > >
    > > Dave Peterson


    --

    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