J
jgrappy
I have a macro that copys three columns Worksheet1 and pastes them
into Worksheet2. The code is run from a Worksheet3 using a command
button that hits a macro containing the following code:
Sheets("Worksheet1").Select
Columns("C:E").Select
Selection.Copy
Sheets("Worksheet2").Select
Cells.Select
ActiveSheet.Paste
That works fine, but I tried to move this code to the
Worksheet_Activate event for Worksheet3 with:
Application.Run ("Macro1")
With this it takes a long time to run and I often get an "Out of Stack
Space" error.
I've also tried just using:
Worksheets("Worksheet2").Columns("A:C").Value =
Worksheets("Worksheet1").Columns("C:E").Value
but, this copies all the cells...I need only the visible cells after a
filter has been applied. Any ideas? Thanks!
-Josh
into Worksheet2. The code is run from a Worksheet3 using a command
button that hits a macro containing the following code:
Sheets("Worksheet1").Select
Columns("C:E").Select
Selection.Copy
Sheets("Worksheet2").Select
Cells.Select
ActiveSheet.Paste
That works fine, but I tried to move this code to the
Worksheet_Activate event for Worksheet3 with:
Application.Run ("Macro1")
With this it takes a long time to run and I often get an "Out of Stack
Space" error.
I've also tried just using:
Worksheets("Worksheet2").Columns("A:C").Value =
Worksheets("Worksheet1").Columns("C:E").Value
but, this copies all the cells...I need only the visible cells after a
filter has been applied. Any ideas? Thanks!
-Josh