Eloise T
Active Member
I need to set the row height to 25.00 (32 Pixels) beginning with row 7 and can't seem to get the macro to cooperate.
Please see attachment; particularly the Sub: Sub Change_Font_To_Calibri_11_And_Change_Row_Height_To_25()
Thanks for your help in advance.
Please see attachment; particularly the Sub: Sub Change_Font_To_Calibri_11_And_Change_Row_Height_To_25()
Thanks for your help in advance.
Code:
Sub Change_Font_To_Calibri_11_And_Set_Row_Height_To_25()
Dim Ws As Worksheet
For Each Ws In ThisWorkbook.Worksheets
If Ws.Cells(Rows.Count, "A").End(xlUp).Row > 6 Then 'Changed 3 to "A" which is the same.
' Affects <Columns A through J>
' > > > This VBA segment changes the font and font size in Columns A through J from whatever it happens to
' be to Calibri 11 starting in Row 7.
Dim wksFnt As Worksheet
Dim rngFnt As Range
For Each wksFnt In ActiveWorkbook.Worksheets
Set rngFnt = Intersect(wksFnt.Range("A7:J" & Rows.Count), wksFnt.UsedRange)
If Not rngFnt Is Nothing Then
With rngFnt.Font
.Size = 11
.Name = "Calibri"
' .N E E D C O M M A N D T O C H A N G E R O W H E I G H T T O 2 5 ( 3 2 P i x e l s ).
Rows("7:257").RowHeight = 25
End With
End If
Next
End If
Next
Beep
End Sub