Declaring an array

Robert E Lee

Active Member
Joined
Aug 10, 2005
Messages
251
Hi All

I have a workbook with a number of sheets and a second workbook containing data that is to be entered into the first workbook base on a selection parameter. This parameter I have called BC and is contained in block with differing numbers of parameters in Range ("A2") to Range ("A" & 2 +N)

Code:
 For Each BC In BR


Set TR = Range(ActiveCell, ActiveCell.Offset(R1, 0))
                               For Each c In TR
                                           If c =BC Then
                                           
                                           Set SelectRange = Range(c.Offset(0, -2), (c.Offset(0, 3)))
                                           
                                           SelectRange.Copy Destination:=rs.Range("A" & R)
                                           R = R + 1
                                           End If
                
                               Next c
It all works perfectly except that BC always seems to contain nothing so the range to be copied is not selected. (So not so perfect then)

Any assistance appreciated

Rob
 

Forum statistics

Threads
1,085,651
Messages
5,384,942
Members
401,927
Latest member
commae

Some videos you may like

This Week's Hot Topics

Top