I'm trying to refactor some code, and got stuck when trying to refactor a section that works on cells
Is this possible?
Code:
Public Sub MainSub ()
MyArray = Range([A1], [B10])
For lngRow = 1 To UBound(MyArray, 1)
[COLOR=#008000] ' Currently I can do this with no problem
' Cell.Offset(, 6).AddComment
' Cell.Offset(, 6).Comment.Text = "Comment"
' What I want to do is [/COLOR]
Refactored(Cell.Offset(, 6))
Next
End Sub
Public Sub Refactored(Cell as Cell)
Cell.AddComment
Cell.Comment.Text = "Comment"
End Sub
Is this possible?