J
Jim Tibbetts
Can anyone tell me why this macro will not PasteSpecial the Columnwidth
attribute(the one I marked with a double asterisk, 4th line from the end). It
handles the other PasteSpecials with no problem.
Sub ProcessWeeklyData()
' Moves last week's NEW TOTAL to PREV TTL and copies THIS WEEK to NEW TOTAL.
Range("WeeklyInfo!D10
59").Select
Selection.Copy
Range("WeeklyInfo!B10").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("WeeklyInfo!H10:H59").Select
Selection.Copy
Range("WeeklyInfo!C10").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("WeeklyInfo!A1:F46").Select
Selection.Copy
Range("WeeklyInfo!A1").Select
' Copies updated weekly information to a new page.
For Each Worksheet In Worksheets
If Application.WorksheetFunction.CountA(Worksheet.UsedRange.Cells) = 0
Then
Worksheet.Select
Exit For
End If
Next
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
** Selection.PasteSpecial Paste:=xlColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Range("A1").Select
ActiveWindow.DisplayGridlines = False
End Sub
Thanks for any help,
attribute(the one I marked with a double asterisk, 4th line from the end). It
handles the other PasteSpecials with no problem.
Sub ProcessWeeklyData()
' Moves last week's NEW TOTAL to PREV TTL and copies THIS WEEK to NEW TOTAL.
Range("WeeklyInfo!D10
Selection.Copy
Range("WeeklyInfo!B10").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("WeeklyInfo!H10:H59").Select
Selection.Copy
Range("WeeklyInfo!C10").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("WeeklyInfo!A1:F46").Select
Selection.Copy
Range("WeeklyInfo!A1").Select
' Copies updated weekly information to a new page.
For Each Worksheet In Worksheets
If Application.WorksheetFunction.CountA(Worksheet.UsedRange.Cells) = 0
Then
Worksheet.Select
Exit For
End If
Next
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
** Selection.PasteSpecial Paste:=xlColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Range("A1").Select
ActiveWindow.DisplayGridlines = False
End Sub
Thanks for any help,