+ Reply to Thread
Results 1 to 4 of 4

Correct VBA syntax

  1. #1
    Ken G.
    Guest

    Correct VBA syntax

    What is the correct vba syntax to use to make a particular cell the active
    cell when the row number and column number are known?

  2. #2
    JE McGimpsey
    Guest

    Re: Correct VBA syntax

    One way:

    ActiveSheet.Cells(rownum, colnum).Activate



    In article <4B2CDF46-FE67-495A-970A-E42327464249@microsoft.com>,
    Ken G. <KenG@discussions.microsoft.com> wrote:

    > What is the correct vba syntax to use to make a particular cell the active
    > cell when the row number and column number are known?


  3. #3
    exceluserforeman
    Guest

    RE: Correct VBA syntax


    If the current cell is known (even if you do not know where that is) and you
    want to know the value of a cell 2 columns over and 5 rows down then

    activecell.offset(0,0).select

    msgbox activecell.offset(5,2) .value,vbinformation, "Offset Manager"


    - - Mark


    "Ken G." wrote:

    > What is the correct vba syntax to use to make a particular cell the active
    > cell when the row number and column number are known?


  4. #4
    Ken G.
    Guest

    Re: Correct VBA syntax

    Thanks for this. I'm trying to get the active cell to remain the same when
    enter is pressed, but in a protected sheet it jumps to the next unprotected
    cell. I thought I may have been able to do it with your response below but I
    can't get it to work. Can you help with a macro to do this?

    "JE McGimpsey" wrote:

    > One way:
    >
    > ActiveSheet.Cells(rownum, colnum).Activate
    >
    >
    >
    > In article <4B2CDF46-FE67-495A-970A-E42327464249@microsoft.com>,
    > Ken G. <KenG@discussions.microsoft.com> wrote:
    >
    > > What is the correct vba syntax to use to make a particular cell the active
    > > cell when the row number and column number are known?

    >


+ 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