Macro autocode is not working after special paste. Why ??

G

Guest

Hi everyone,
I used record macro and got some code.
It works till copying in the new workbook.
After that I have done some formatting. It strucks up with the 2nd part of
my code below, what should change any help on this...
---- The following part works.
Application.Goto Reference:="SENDRANGE"
ActiveWindow.SmallScroll ToRight:=2
Selection.AutoFilter Field:=1, Criteria1:="SHOW"
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveSheet.Select

--- NOT WORKING FROM THE FOLLOWING LINES.
Application.CutCopyMode = False
Range("a1").Select
Rows("5:5").EntireRow.AutoFit
Columns("H:Q").ColumnWidth = 12
Selection.NumberFormat = "#,##0_);[Red](#,##0)"
With ActiveWindow
.DisplayGridlines = False
.DisplayZeros = False
End With
Range("G5").Select
Columns("G:G").ColumnWidth = 9.86
Columns("D:D").EntireColumn.AutoFit
Columns("F:F").EntireColumn.AutoFit
Columns("E:E").EntireColumn.AutoFit
Columns("G:G").EntireColumn.AutoFit
 
P

paul.robinson

Hi
Seems to do as it is told on my machine. In what sense does it not
work?

regards
Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top