Hello,
I am geting the run time error 1004 'Select Method of Range Failed'.
I am attempting to copy data from the active workbook and then paste the data into a new workbook.
It is pasting fine, but when I try to select row 1 to bold the header the code errors out.
Here is the code:
Range("A1:E1").Select
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Rows("1:1").Select (<--IT BOMBS HERE)
Selection.Font.Bold = True
Cells.Select
Cells.EntireColumn.AutoFit
Thanks for your help!
I am geting the run time error 1004 'Select Method of Range Failed'.
I am attempting to copy data from the active workbook and then paste the data into a new workbook.
It is pasting fine, but when I try to select row 1 to bold the header the code errors out.
Here is the code:
Range("A1:E1").Select
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Rows("1:1").Select (<--IT BOMBS HERE)
Selection.Font.Bold = True
Cells.Select
Cells.EntireColumn.AutoFit
Thanks for your help!