I tried to do a macro where the entire row will be bold if the first cell of the row is bold.
Sub Macro1()
'
' Macro1 Macro
'
' Keyboard Shortcut: Ctrl+q
'
Dim col, row As Integer
col = 0
row = 0
Do
If Sheet1.Range(Sheet1.Cells(row, 0), Sheet1.Cells(row, 0)).Font.Bold = True Then
Sheet1.Range(Sheet1.Cells(row, 0), Sheet1.Cells(row, 0)).EntireRow.Font.Bold = True
row = row + 1
End If
Loop Until IsEmpty(Sheet1.Range(Sheet1.Cells(row, 0), Sheet1.Cells(row, 0)).Text)
Application.Goto Reference:="Macro1"
End Sub
Why is my code not working?
Sub Macro1()
'
' Macro1 Macro
'
' Keyboard Shortcut: Ctrl+q
'
Dim col, row As Integer
col = 0
row = 0
Do
If Sheet1.Range(Sheet1.Cells(row, 0), Sheet1.Cells(row, 0)).Font.Bold = True Then
Sheet1.Range(Sheet1.Cells(row, 0), Sheet1.Cells(row, 0)).EntireRow.Font.Bold = True
row = row + 1
End If
Loop Until IsEmpty(Sheet1.Range(Sheet1.Cells(row, 0), Sheet1.Cells(row, 0)).Text)
Application.Goto Reference:="Macro1"
End Sub
Why is my code not working?