Row Reference

  • Thread starter Thread starter Przybo
  • Start date Start date
P

Przybo

Can anyone help me with this code?

I'm not sure why it's not working


Private Sub MultiPage1_Change()
Dim RowNumber As Variant

RowNumber = Sheets("Access Upload").ActiveCell.Row

TextBox1.Value = Sheets("Access Upload").Range("A " & RowNumber & "")

End Sub
 
Hi,

Change:
RowNumber = Sheets("Access Upload").ActiveCell.Row

To:
RowNumber = ActiveCell.Row

If you need to ensure sheet integrity, activate the sheet first, then get
the row:

Sheets("Access Upload").Activate
RowNumber = ActiveCell.Row

HTH.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top