See the ribbon of buttons above your post area? Click the last button on the right. That's all you usually need to do.
28
You can use Application.Caller, but you would probably be best to pass the cell to the function.
With Application.Caller
CallerRows = .Rows.Count
CallerCols = .Columns.Count
CallerAddr = .Address
End With
See: http://www.cpearson.com/excel/WritingFun...InVBA.aspx
To pass the cell:
=SomeFunction(A1)
Where the code has:
SomeFunction(r)
Share
Improve
See how pretty that shows up, if you just click the VIEW SOURCE button (Ctrl-Shift-S) *before* pasting into the forums?
28
You can use Application.Caller, but you would probably be best to pass the cell to the function.
With Application.Caller
CallerRows = .Rows.Count
CallerCols = .Columns.Count
CallerAddr = .Address
End With
See: http://www.cpearson.com/excel/WritingFun...InVBA.aspx
To pass the cell:
=SomeFunction(A1)
Where the code has:
SomeFunction(r)
Share
Improve
See how pretty that shows up, if you just click the VIEW SOURCE button (Ctrl-Shift-S) *before* pasting into the forums?