NateW
11-14-2007, 12:07 PM
Hi, Folks.
Really quick question...I tried going through help files, and I'm sure it's in there, but I don't seem to be searching for the right stuff.
All want to do is have a bit of code that change the alignment of a cell to center.
Here is the code I'm using - I'm looking for a statement at the end that will make the cell center aligned...
Sub FlagNoTripNum()
Dim flagRow As Integer
ThisWorkbook.Activate
Sheets("Gate Control").Activate
flagRow = 4
Do Until Sheets("Gate Control").Cells(flagRow, 6).Value = ""
If Sheets("Gate Control").Cells(flagRow, 1).Value = "" Then
Sheets("Gate Control").Cells(flagRow, 1).Value = "N/A"
Sheets("Gate Control").Cells(flagRow, 1).Interior.ColorIndex = 3
Sheets("Gate Control").Cells(flagRow, 1).Font.ColorIndex = 2
'ALIGN STATEMENT TO GO HERE
End If
flagRow = flagRow + 1
Loop
End Sub
Thanks a ton in advance...
N.
Really quick question...I tried going through help files, and I'm sure it's in there, but I don't seem to be searching for the right stuff.
All want to do is have a bit of code that change the alignment of a cell to center.
Here is the code I'm using - I'm looking for a statement at the end that will make the cell center aligned...
Sub FlagNoTripNum()
Dim flagRow As Integer
ThisWorkbook.Activate
Sheets("Gate Control").Activate
flagRow = 4
Do Until Sheets("Gate Control").Cells(flagRow, 6).Value = ""
If Sheets("Gate Control").Cells(flagRow, 1).Value = "" Then
Sheets("Gate Control").Cells(flagRow, 1).Value = "N/A"
Sheets("Gate Control").Cells(flagRow, 1).Interior.ColorIndex = 3
Sheets("Gate Control").Cells(flagRow, 1).Font.ColorIndex = 2
'ALIGN STATEMENT TO GO HERE
End If
flagRow = flagRow + 1
Loop
End Sub
Thanks a ton in advance...
N.