I am having trouble finding a surefire to copy only visible cells from one worksheet into a new workbook. My initial workbook is filtered. Something along the lines of:
Sub RangeToNew()
Dim newBook as Workbook
Set newBook = Workbooks.Add
ThisWorkbook.Worksheets("worksheet").SpecialCells(xlCellTypeVisible).Copy _
Before:=newBook.Worksheets(1)
End Sub
This doesn’t work.
Looks like you need to set the SpecialCells range to a Range object first, then do your copy. Try this: