Can anyone explain what I'm doing wrong here.
I have a questionaire that i need to send to users and have them answer. The first sheet asks them to select a number from a drop down list. Then they click next. When this is done, I need to move them to the next worksheet in the workbook and make the specified number of textboxes visible on it. (all textboxes start with the visible attribute set to false). The code i currently have for when the user clicks next button is shown below. But I get the "Object doesn't support this property or methos" error.
Any help much appreciated.
Lee.
Sub Move_To_Q2()
Dim x As Integer, i As Integer
Dim namestring As Variant
x = Worksheets("Output").Range("B2").Value
For i = 1 To x
If x >= 1 Then
Worksheets("Step 2").TextBox1.Visible = True
Worksheets("Step 2").TextBox31.Visible = True
Else
Worksheets("Step 2").TextBox1.Visible = False
Worksheets("Step 2").TextBox31.Visible = False
End If
End Sub
I have a questionaire that i need to send to users and have them answer. The first sheet asks them to select a number from a drop down list. Then they click next. When this is done, I need to move them to the next worksheet in the workbook and make the specified number of textboxes visible on it. (all textboxes start with the visible attribute set to false). The code i currently have for when the user clicks next button is shown below. But I get the "Object doesn't support this property or methos" error.
Any help much appreciated.
Lee.
Sub Move_To_Q2()
Dim x As Integer, i As Integer
Dim namestring As Variant
x = Worksheets("Output").Range("B2").Value
For i = 1 To x
If x >= 1 Then
Worksheets("Step 2").TextBox1.Visible = True
Worksheets("Step 2").TextBox31.Visible = True
Else
Worksheets("Step 2").TextBox1.Visible = False
Worksheets("Step 2").TextBox31.Visible = False
End If
End Sub
Last edited: