G
Guest
This is the portion of the macro that no longer works in EXCEL 2003. I have
tried the selection.copy in so many different ways. I was getting an error
of invalid range - in subsequent tests I got other messges - the last few
times the A2 cell on the "random" sheet was showing active and the sheet was
blank although there was data on the sheet I was copying from. Other macros
read in a file and do a random 10% selection of the records and flags them as
audit in the A column. In Excel 2000 I was able to copy them into the blank
worksheet (named Random, or sheets(2)) so that I could add a descriptive
heading before printing. When I saved the file in Excel 2003 it no longer
works. Gets to this point and stops. Can any of you tell me why or give me
a workaround. Thanks for your time and consideration. Hoss
Worksheets(3).Range("A1").AutoFilter _
Field:=1, Criteria1:="audit"
'hide column 1 so it won't be selected
Columns("A:A").Select
Selection.EntireColumn.Hidden = True
'select all cells that have a "visible" property.
Range("B1").CurrentRegion.SpecialCells(xlVisible).Select
'Copy the visible cells to worksheet Random.
Selection.Copy Worksheets("Random").Range("A2")
tried the selection.copy in so many different ways. I was getting an error
of invalid range - in subsequent tests I got other messges - the last few
times the A2 cell on the "random" sheet was showing active and the sheet was
blank although there was data on the sheet I was copying from. Other macros
read in a file and do a random 10% selection of the records and flags them as
audit in the A column. In Excel 2000 I was able to copy them into the blank
worksheet (named Random, or sheets(2)) so that I could add a descriptive
heading before printing. When I saved the file in Excel 2003 it no longer
works. Gets to this point and stops. Can any of you tell me why or give me
a workaround. Thanks for your time and consideration. Hoss
Worksheets(3).Range("A1").AutoFilter _
Field:=1, Criteria1:="audit"
'hide column 1 so it won't be selected
Columns("A:A").Select
Selection.EntireColumn.Hidden = True
'select all cells that have a "visible" property.
Range("B1").CurrentRegion.SpecialCells(xlVisible).Select
'Copy the visible cells to worksheet Random.
Selection.Copy Worksheets("Random").Range("A2")