Help with user form
Posted by Paul on October 29, 2001 2:52 AM
Hi: Thanks for taking the time to help I am trying to learn VBA. I have made a user form with the code below, I want to hide sheet 2 so the persons entering data cannot see, or change it, but when I do I get and error because sheet 2 cannot be found. Can the code be changed so I can do this? Any other ideas? Again thanks for your help.
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Sheets("Sheet2").Select
Range("A65536").Select
Selection.End(xlUp).Select
ActiveCell.Offset(1, 0).Select
ActiveCell.Value = UserForm1.TextBox1.Value
ActiveCell.Offset(0, 1).Value = UserForm1.TextBox2.Value
ActiveCell.Offset(0, 2).Value = UserForm1.TextBox3.Value
ActiveCell.Offset(0, 3).Value = UserForm1.TextBox4.Value
ActiveCell.Offset(0, 4).Value = UserForm1.TextBox5.Value
ActiveCell.Offset(0, 5).Value = UserForm1.TextBox6.Value
Application.ScreenUpdating = True