LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default formating current row to center text (thanks)

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell Formating- Why won't my data center WesleyL Excel Discussion (Misc queries) 1 May 6th 09 12:59 AM
Conditional Formating - How to emphsize the current Month Negda Excel Worksheet Functions 6 April 5th 08 06:46 PM
center text Gary''s Student Excel Discussion (Misc queries) 2 May 5th 07 06:26 PM
Cells not formating (won't center) Woody13 Excel Discussion (Misc queries) 2 January 25th 06 12:33 AM
Center text in dialog box Raza Excel Worksheet Functions 1 December 5th 05 08:34 PM


All times are GMT +1. The time now is 08:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"