View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default Copy changing group of cells from Sheet1 to Sheet2

Had my mind on range, needed region. Use this modified version.

Private Sub CommandButton1_Click()
Sheets(1).ActiveCell.CurrentRegion.Copy _
Sheets(2).Range("A1")
Application.CutCopyMode = False
End Sub




"Brad" wrote in message
...
I have a logical group of cells in Sheet1 that can change in size over time
(new cells are added, old cells are removed)

I would like to have a way to copy this group of cells from Sheet1 into
Sheet2 with the push of a button. (Keep in mind that the number of cells
fluctuate)

I am curious if anyone else has ever run into this and if there is a VBA
example of how they handled it.

Thanks in advance for your assistance.

Brad