View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
RocketRod
 
Posts: n/a
Default Want macro to select & copy cells from a different worksheet

I should have - sorry
This stops with the Range("B4").Select line highlighted

Private Sub CommandButton1_Click()
'
' Macro1 Macro
' Macro recorded 27/02/2006 by Hughes
'

'

Sheets("Sheet2").Select
Range("B4").Select
Rows("1:3").Select
Selection.Copy
Range("A10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet1").Select
Range("B4").Select
Rows("1:3").Select
Application.CutCopyMode = False
Selection.Copy
Range("A10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("B5").Select
Application.CutCopyMode = False

End Sub

It stops in debug with the



"Don Guillett" wrote:

As always, post your macro for comments and suggestions.

--
Don Guillett
SalesAid Software

"RocketRod" wrote in message
...
I have a spreadsheet with "Sheet 1" and "Sheet 2"
Both have some data
I want a command button on Sheet 1 with code that will copy & move some
data
on Sheet 1 elsewhere on Sheet 1, then on Sheet 2 copy & move some other
data
on Sheet 2 elsewhere on Sheet 2 then return active cell to Sheet 1
If I record a macro and run it it works perfectly
If I copy that code into the Command Button code it has an error when it
selects the data on Sheet 2