View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default getting the selected range and active cell of a non active worksheetsheet

You can access a cell or a range on an inactive (not hidden) sheet by
specific value. Assume Sheet1 is the active sheet:

Sheets("Sheet2").Range("B4") = ActiveSheet.Range("A1").Value

would put the value of A1 in the active sheet into cell B4 of sheet2 without
activating sheet2. You can do the same thing in reverse:

ActiveSheet.Range("A1") = Sheets("Sheet2").Range("B4").Value


"GerryGerry" wrote in message
...
Can one access the active cell of a non active sheet (without activating
it first) in VBA as well as the selected range?

any help much appreciated as always
(i'm using Excel 2003)