![]() |
simple copy column works but ERROR!
I use the following to 1) delete content in sheet 1 a:b
2) copy 2 columns (a:b) that are filtered - sheet2 Sub Macro1() Sheets("Sheet1").Columns("A:B").ClearContents Sheets("Sheet3").Activate ActiveSheet.UsedRange.SpecialCells(xlCellTypeVisib le).Copy _ Destination:=Sheet1.Range("A1") End Sub I need this to paste in sheet1 - a1. It works but I get an error 1044. Is my syntex correct? Am I able to ignore error? |
simple copy column works but ERROR!
Works fine here. You don't have the space in the word "visible" in your code do you? -- Ramthebuffs ------------------------------------------------------------------------ Ramthebuffs's Profile: http://www.excelforum.com/member.php...o&userid=16429 View this thread: http://www.excelforum.com/showthread...hreadid=489298 |
simple copy column works but ERROR!
Jack
Sheet1 may not be "Sheet1" Try this amended version. Sub Macro1() Sheets("Sheet1").Columns("A:B").ClearContents Sheets("Sheet3").Activate ActiveSheet.UsedRange.SpecialCells(xlCellTypeVisib le).Copy _ Destination:=Sheets("Sheet1").Range("A1") End Sub Gord Dibben Excel MVP On Tue, 29 Nov 2005 18:22:01 -0800, "Jack" wrote: I use the following to 1) delete content in sheet 1 a:b 2) copy 2 columns (a:b) that are filtered - sheet2 Sub Macro1() Sheets("Sheet1").Columns("A:B").ClearContents Sheets("Sheet3").Activate ActiveSheet.UsedRange.SpecialCells(xlCellTypeVisi ble).Copy _ Destination:=Sheet1.Range("A1") End Sub I need this to paste in sheet1 - a1. It works but I get an error 1044. Is my syntex correct? Am I able to ignore error? |
All times are GMT +1. The time now is 07:00 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com