In "Excel VBA Power Programming 2016" Chapter 7 there is a function to determine where the format of a cell is Bold
Function ISBOLD(cell) As Boolean
' Returns TRUE if cell is bold
ISBOLD = cell.Range("A1").Font.Bold
End Function
It works when used in a spreadsheet and "cell" is an address such as "A2"
When I put it in sub I could not get it to work. If I changed "cell" to "range" then it worked fine.
My suspicion is that I'm not understanding what "cell" means. Is it an object like Range? If so, shouldn't cell.address do the same thing as ActiveCell.Range.Address?
I'd appreciate guidance.
Function ISBOLD(cell) As Boolean
' Returns TRUE if cell is bold
ISBOLD = cell.Range("A1").Font.Bold
End Function
It works when used in a spreadsheet and "cell" is an address such as "A2"
When I put it in sub I could not get it to work. If I changed "cell" to "range" then it worked fine.
My suspicion is that I'm not understanding what "cell" means. Is it an object like Range? If so, shouldn't cell.address do the same thing as ActiveCell.Range.Address?
I'd appreciate guidance.