Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks , I try this before but did not use the & .
-----Original Message----- Because you have not specified any row in your command Rows().Select all rows are selected Try For lngROW = 3 To Rng.Rows.Count cellchar = Cells(lngROW, 1).Value If Mid(cellchar, 1, 10) = "==========" Then ActiveWindow.SelectedSheets.HPageBreaks.Add Befo=Cells(lngROW + 1, 1) Application.StatusBar = "Row: " + Format(lngROW) ElseIf Mid(cellchar, 1, 6) = "Agency" Then Rows(lngROW - 1 & ":" & lngROW + 3).Select With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom .WrapText = False .Orientation = 0 .AddIndent = False .ShrinkToFit = False .MergeCells = False End With End If Next lngROW --- Message posted from http://www.ExcelForum.com/ . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cell Formating- Why won't my data center | Excel Discussion (Misc queries) | |||
Conditional Formating - How to emphsize the current Month | Excel Worksheet Functions | |||
center text | Excel Discussion (Misc queries) | |||
Cells not formating (won't center) | Excel Discussion (Misc queries) | |||
Center text in dialog box | Excel Worksheet Functions |