Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Goto

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Ive got a cell reference written in Cell A1 and I want a macro to select this cell?
    Can any one help with the code?

  2. #2
    New Member
    Join Date
    Mar 2002
    Location
    England
    Posts
    46
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    to select a cell use

    Range("A1").Select

    Why couldn't you have just recorded the macro?

  3. #3
    New Member
    Join Date
    Mar 2002
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I phrased that wrongly.
    I want to copy the value in the cell and select the value in the cell.

    Eg In A1 there is 'C5' I want XL to select C5

  4. #4
    Board Regular
    Join Date
    Mar 2002
    Location
    Keaau, Hawaii
    Posts
    238
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-03-07 08:08, Yellowdude wrote:
    I phrased that wrongly.
    I want to copy the value in the cell and select the value in the cell.

    Eg In A1 there is 'C5' I want XL to select C5
    The following assumes you have a button named CommandButton1 and this button is on the same sheet as the cell being referenced.


    If the value in A1 is a cell refeerence this will select it.
    That is if A1 has C5 in it the routine will select cell C5.
    Hope that is what your looking to do.

    Option Explicit
    Dim x As String
    Sub CommandButton1_Click()
    x = Range("A1").Value
    Range(x).Select

    End Sub


    [ This Message was edited by: KniteMare on 2002-03-07 08:23 ]

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •