Results 1 to 4 of 4

Thread: Range("C7:D7").Select...make 7 Variabel

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    The Netherlands
    Posts
    96

    Range("C7:D7").Select...make 7 Variabel

    Hi...
    I've a small Excel VBA problem which should be very easy to solve...

    Sub RanSelect()
    Range("C77").Select
    End Sub

    I do want to make the 7 variabel...
    So I only have to enter 7 and it displays me Range("C77")
    If entered 25 it gives me range C2525

    Any help is appreciated

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    VB Code:
    1. Sub RanSelect()
    2.     dim sRange as string
    3.     sRange = "25"
    4.     Range("C" & sRange & ":D" & sRange).Select
    5. End Sub


    this should work.. i didn't test it
    Last edited by kleinma; Aug 21st, 2002 at 09:14 AM.

  3. #3
    Frenzied Member
    Join Date
    Jul 2002
    Posts
    1,370
    Matt -
    click the disable smilies checkbox on the reply screen.

    The was my attempt at humor....

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    Originally posted by jim mcnamara
    Matt -
    click the disable smilies checkbox on the reply screen.

    The was my attempt at humor....
    thanks jim.. after almost 3k posts i never looked at that

Posting Permissions

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



Click Here to Expand Forum to Full Width