View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Append a column with the text "Remarks"

Your formatting the whole first row, so the formatting should already be the
same

ActiveWindow.Zoom = 80
' added line
Cells(1,256).End(xltoLeft)(1,2).Value = "Remarks"
Rows("1:1").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 90
.AddIndent = False
.ShrinkToFit = False
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlCenter
.WrapText = True
.Orientation = 90
.AddIndent = False
.ShrinkToFit = False
.MergeCells = False
End With
With Selection.Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Cells.Select
Cells.EntireColumn.AutoFit
Range("A1").Select
Selection.AutoFilter
Rows("2:2").Select
ActiveWindow.FreezePanes = True
Range("A1").Select
End Sub

--
Regards,
Tom Ogilvy

wrote in message
ups.com...
Hi,

We recorded a macro below to automatically filter, align horizontally,
center vertically and orient 90 deg. and so on of the headings for a
certain workbook. How can I add a program in the same macro that will
automatically append a column with the text "Remarks" which has the
same alignment and font settings as the other headings?

Sorry for having a spoonfeeding attitude but I tried several times to
no avail. I am still a newbie.

Your support is highly appreciated.



ActiveWindow.Zoom = 80
Rows("1:1").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 90
.AddIndent = False
.ShrinkToFit = False
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlCenter
.WrapText = True
.Orientation = 90
.AddIndent = False
.ShrinkToFit = False
.MergeCells = False
End With
With Selection.Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Cells.Select
Cells.EntireColumn.AutoFit
Range("A1").Select
Selection.AutoFilter
Rows("2:2").Select
ActiveWindow.FreezePanes = True
Range("A1").Select
End Sub