Consulting

Results 1 to 2 of 2

Thread: setting dynamically

  1. #1

    setting dynamically

    If we set
    Range("A10:B12").Select, this will highlight from row 10 to row 12 from column A to Column B

    How Can i set this dynamicaaly
    i=10
    Range("Ai:Bi+2").Select. The above doesnt work. Any help

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    Range("A" & i & ":B" & i + 2).Select
    [/vba]

    or

    [vba]

    Cells(i, "A").Resize(3, 2).Select
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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