Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Option Explicit
Public Sub DisconectedRange() Dim vArray As Variant Dim WSRange As Range Dim L1 As Integer, U1 As Integer, L2 As Integer, U2 As Integer With ThisWorkbook.Worksheets(1) Set WSRange = Union(.Range(.Cells(2, 1), .Cells(4, 1)), ..Range(.Cells(2, 6), .Cells(4, 6))) End With vArray = WSRange.Value 'Only seems to capture WSRange.Areas(1) L1 = LBound(vArray, 1) U1 = UBound(vArray, 1) L2 = LBound(vArray, 2) U2 = UBound(vArray, 2) MsgBox CStr(L1) + "," + CStr(U1) + vbCrLf + CStr(L2) + "," + CStr(U2) 'Is there a way to pull in a disconnected range into a Variant? End Sub Thanks, Bob |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I assign range to variant and use | Excel Discussion (Misc queries) | |||
Assigning range to variant | Excel Programming | |||
Assigning range to variant | Excel Programming | |||
How to define a Range with variant? | Excel Programming | |||
Best way to paste a variant array into a range? | Excel Programming |