Sub selectRange()
Dim A As String
A = ActiveCell.Address
MsgBox A
MsgBox Cells(A)
End Sub
When I pass A as a parameter it shows error how should i pass values in parameter for current cell's data.
The proper syntax for Cells() is:
Cells([row number], [column number]).Value
To use the cell's address, use Range() instead:
Range([Address Range]).Value
Range(A).Value 'in your example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With