epd
02-29-2012, 06:26 PM
Hi guys,
i am having trouble coding this bit
what i want
*user manually selects cell
*click button (shape) in excel that opens userform9
*hit "select" button in userform9
*row that contains selected cell is selected
*userform9 closes
*userform8 opens
*userform8 has 6 text boxes
*i want the 6 text boxes to be filled out with what is in certain cells that are int he selected row, ie:
textbox1 = col H with selected row
textbox1 = col N with selected row
textbox1 = col P with selected row
textbox1 = col Q with selected row
textbox1 = col R with selected row
textbox1 = col S with selected row
what i have
*user manually selects cell then clicks excel button (working)
*link from excel button to userform9 (working)
code
Sub Rectangle10_Click()
'Promt
UserForm9.Show
End Sub
*hit select button on userform9 to select row (working)
code
Private Sub CommandButton1_Click()
'Select row containing drawing number
Selection.EntireRow.Select
'Close Userform9
Unload UserForm9
'Promt
UserForm8.Show
End Sub
Private Sub CommandButton2_Click()
'Close Userform9
Unload UserForm9
End Sub
*userform8 opens and text boxes to show cells vaules (not working)
code
Private Sub UserForm_Activate()
'Select row containing drawing number
TextBox1.Text = cell(.row,H)
TextBox2.Text = cell(.row,n)
TextBox3.Text = cell(.row,p)
TextBox4.Text = cell(.row,q)
TextBox5.Text = cell(.row,r)
TextBox6.Text = cell(.row,s)
End Sub
Private Sub CommandButton2_Click()
'Close Userform8
Unload UserForm8
End Sub
what am i supposed to do here?
thanks for your help
i am having trouble coding this bit
what i want
*user manually selects cell
*click button (shape) in excel that opens userform9
*hit "select" button in userform9
*row that contains selected cell is selected
*userform9 closes
*userform8 opens
*userform8 has 6 text boxes
*i want the 6 text boxes to be filled out with what is in certain cells that are int he selected row, ie:
textbox1 = col H with selected row
textbox1 = col N with selected row
textbox1 = col P with selected row
textbox1 = col Q with selected row
textbox1 = col R with selected row
textbox1 = col S with selected row
what i have
*user manually selects cell then clicks excel button (working)
*link from excel button to userform9 (working)
code
Sub Rectangle10_Click()
'Promt
UserForm9.Show
End Sub
*hit select button on userform9 to select row (working)
code
Private Sub CommandButton1_Click()
'Select row containing drawing number
Selection.EntireRow.Select
'Close Userform9
Unload UserForm9
'Promt
UserForm8.Show
End Sub
Private Sub CommandButton2_Click()
'Close Userform9
Unload UserForm9
End Sub
*userform8 opens and text boxes to show cells vaules (not working)
code
Private Sub UserForm_Activate()
'Select row containing drawing number
TextBox1.Text = cell(.row,H)
TextBox2.Text = cell(.row,n)
TextBox3.Text = cell(.row,p)
TextBox4.Text = cell(.row,q)
TextBox5.Text = cell(.row,r)
TextBox6.Text = cell(.row,s)
End Sub
Private Sub CommandButton2_Click()
'Close Userform8
Unload UserForm8
End Sub
what am i supposed to do here?
thanks for your help