Need 2 create userform that uses data from rows...HELP.
put those two lines into the Userfrom's Initialise event...
Option Explicit
Private iRow As Long
Private Sub UserForm_Initialize()
iRow = ActiveCell.Row
Me.Caption = Me.Caption & " " & Worksheets("Project").Cells(iRow, 1)
End Sub
"Adam" wrote:
I have this worksheet that will consist of a variable amount of rows. I need
the user to be able to select a cell (thus it would consitute it as if they
were selecting the entire row) and that data to show up on a userform.
I have tried to use:
iRow = ActiveCell.Row
frmUserform.Caption = Caption & " " & Worksheet("Project").Cells(iRow,1)
However I have to click the command button to open the form. Then close the
form, and open it again via the command button; then it will show the correct
data.
The reason I am doing it this way is because I have 256 cells per a row and
wish to create an easy interface to edit the cells.
Does anyone have ideas of what I am doing wrong?
|