View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
(PeteCresswell) (PeteCresswell) is offline
external usenet poster
 
Posts: 139
Default Discontinuous Range via VBA using R1C1?


MsgBox Range("H3:H14,L3:M14").Address(ReferenceStyle:=xlR 1C1) yields
-------------------------
R3C8:R14C8,R3C12:R14C13
-------------------------

but the VBA coding
---------------------------------------
Range(R3C8:R14C8, R3C12:R14C13).Select
---------------------------------------

doesn't even get past the parser - the line turns red and that's the end of it.


Intuitively,
------------------------------------------------------------------------------
With ActiveSheet
Range(.Cells(3, 8), .Cells(14, 8), .Cells(3, 12), .Cells(14, 13)).Select
End With
------------------------------------------------------------------------------
seems tb closer, but it dies at compile time with "Wrong number of arguments or
invalid property assignment".

Can anybody give me a nudge in the right direction?
--
PeteCresswell