(Solved) – Copy row number of active cell to clipboard (Excel VBA)

  • by

I want to create a macro that takes the row number of the active cell and copies it to the clipboard.

When I execute the following code I get ‘compile error: invalid qualifier’.

I have forgotten most of my VBA but surely something this simple should work? Thanks in advance for any help you can offer.

Sub macro3()
    Dim x As Integer
    x = ActiveCell.row
End Sub

Leave a Reply

Your email address will not be published. Required fields are marked *