+ Reply to Thread
Results 1 to 4 of 4

Syntax error

  1. #1
    Registered User
    Join Date
    11-14-2005
    Posts
    37

    Syntax error

    Hi!

    I'm trying to select a cell when an event comes (worksheet activation)

    Application.Goto ThisWorkbook.Worksheets("INDICATORS List").Range(N4)

    is the line and the error message I get is: "Application-defined or object-defined error"

    Can anyone help me in selecting the "N4" cell from "INDICATORS Lists" when activating another worksheet ?

    Thanks in advance,
    Chris

  2. #2
    Norman Jones
    Guest

    Re: Syntax error

    Hi Chris,

    Your syntax works for me, providing the cell reference is enclosed in
    quotes:

    Application.Goto ThisWorkbook. _
    Worksheets("INDICATORS List").Range("N4")


    ---
    Regards,
    Norman



    "loopoo" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi!
    >
    > I'm trying to select a cell when an event comes (worksheet activation)
    >
    > Application.Goto ThisWorkbook.Worksheets("INDICATORS List").Range(N4)
    >
    > is the line and the error message I get is: "Application-defined or
    > object-defined error"
    >
    > Can anyone help me in selecting the "N4" cell from "INDICATORS Lists"
    > when activating another worksheet ?
    >
    > Thanks in advance,
    > Chris
    >
    >
    > --
    > loopoo
    > ------------------------------------------------------------------------
    > loopoo's Profile:
    > http://www.excelforum.com/member.php...o&userid=28792
    > View this thread: http://www.excelforum.com/showthread...hreadid=487163
    >




  3. #3
    Charlie
    Guest

    RE: Syntax error

    I don't know about the rest of the line, but you need quotes around N4 in the
    range:

    Range("N4")

    "loopoo" wrote:

    >
    > Hi!
    >
    > I'm trying to select a cell when an event comes (worksheet activation)
    >
    > Application.Goto ThisWorkbook.Worksheets("INDICATORS List").Range(N4)
    >
    > is the line and the error message I get is: "Application-defined or
    > object-defined error"
    >
    > Can anyone help me in selecting the "N4" cell from "INDICATORS Lists"
    > when activating another worksheet ?
    >
    > Thanks in advance,
    > Chris
    >
    >
    > --
    > loopoo
    > ------------------------------------------------------------------------
    > loopoo's Profile: http://www.excelforum.com/member.php...o&userid=28792
    > View this thread: http://www.excelforum.com/showthread...hreadid=487163
    >
    >


  4. #4
    Registered User
    Join Date
    11-14-2005
    Posts
    37
    Thank you both for your replies.

    It's working now.

    Chris

+ 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