Count cells from entire row that contain value

Macro Title:
Worksheet Variable:
Worksheet Name:
Row Reference:
enter the row reference from which you want to count the number of cells that contain a value
Output Cell:
First Comment:

'
Second Comment:

'
Sub Count_cells_from_entire_row_that_contain_value()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("Analysis")
'count the number of cells in a single row that have a value
ws.Range("B8") = Application.WorksheetFunction.CountA(ws.Range("5:5"))

End Sub

Sub Count_cells_from_entire_row_that_contain_value()
'declare a variable

Dim ws As Worksheet

Set ws = Worksheets("Analysis")
'count the number of cells in a single row that have a value

ws.Range("B8") = Application.WorksheetFunction.CountA(ws.Range("5:5"))

End Sub

Sub Count_cells_from_entire_row_that_contain_value()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("Analysis")
'count the number of cells in a single row that have a value
ws.Range("B8") = Application.WorksheetFunction.CountA(ws.Range("5:5"))

End Sub