Closed Thread
Results 1 to 3 of 3

Copy Cells to variant array

Hybrid View

Guest Copy Cells to variant array 04-13-2006, 05:45 AM
Guest Re: Copy Cells to variant... 04-13-2006, 06:45 AM
Guest Re: Copy Cells to variant... 04-13-2006, 08:10 AM
  1. #1
    Jean-Pierre Bidon
    Guest

    Copy Cells to variant array

    Hie,
    I think this question is rather banal but I'm stucked on it.
    I would like to copy a range (or a collection of cells) in a variant array.
    Using this syntax doesn't work:
    ---> vaRst = rgCurr(Cells(2, 1), Cells(iRow, iCol))
    Need help.
    Thanks.

    Jean-Pierre Bidon



  2. #2
    Bob Phillips
    Guest

    Re: Copy Cells to variant array

    This works for me

    Dim rgCurr As Range
    Dim vaRst
    Dim iRow As Long, iCol As Long

    iRow = 3: iCol = 6
    Set rgCurr = Range("A1:H10")
    vaRst = rgCurr.Cells(2, 1).Resize(iRow - 1, iCol)

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "Jean-Pierre Bidon" <can_369@laposte.net> wrote in message
    news:u4b$a5tXGHA.1204@TK2MSFTNGP04.phx.gbl...
    > Hie,
    > I think this question is rather banal but I'm stucked on it.
    > I would like to copy a range (or a collection of cells) in a variant

    array.
    > Using this syntax doesn't work:
    > ---> vaRst = rgCurr(Cells(2, 1), Cells(iRow, iCol))
    > Need help.
    > Thanks.
    >
    > Jean-Pierre Bidon
    >
    >




  3. #3
    Jean-Pierre Bidon
    Guest

    Re: Copy Cells to variant array

    Thanks, this works for me to.

    "Bob Phillips" <bob.phillips@notheretiscali.co.uk> a écrit dans le message
    de news: Oj6wKbuXGHA.4388@TK2MSFTNGP03.phx.gbl...
    > This works for me
    >
    > Dim rgCurr As Range
    > Dim vaRst
    > Dim iRow As Long, iCol As Long
    >
    > iRow = 3: iCol = 6
    > Set rgCurr = Range("A1:H10")
    > vaRst = rgCurr.Cells(2, 1).Resize(iRow - 1, iCol)
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (remove nothere from email address if mailing direct)
    >
    > "Jean-Pierre Bidon" <can_369@laposte.net> wrote in message
    > news:u4b$a5tXGHA.1204@TK2MSFTNGP04.phx.gbl...
    >> Hie,
    >> I think this question is rather banal but I'm stucked on it.
    >> I would like to copy a range (or a collection of cells) in a variant

    > array.
    >> Using this syntax doesn't work:
    >> ---> vaRst = rgCurr(Cells(2, 1), Cells(iRow, iCol))
    >> Need help.
    >> Thanks.
    >>
    >> Jean-Pierre Bidon
    >>
    >>

    >
    >




Closed 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