Student1000
Board Regular
- Joined
- Jul 17, 2007
- Messages
- 58
I created a form(UserForm1) in excel. I would like it to come up everytime a user open the workbook.
Second, the form will have check boxes which will populate a column when checked. I was able to do that without using a form with the following code:
Private Sub CheckBox1_Click()
If CheckBox1 = True Then
Dim NextCell As Range
'Set NextCell to last unavailable cell beyond D4 (next cell is available)
Set NextCell = Sheet1.Range("B41").End(xlDown)
'Quit if no place to put value (next available cell is beyond row 20)
If NextCell.Row < 32000 And NextCell.Row > 71 Then Exit Sub
If NextCell.Row > 32000 Then Set NextCell = Range("B41")
NextCell.Offset(1).Value = "Thank you for choosing our services...."
End If
End Sub
I dont know what i need to change to make this work on a checkbox thats on a form
Thanks.
Second, the form will have check boxes which will populate a column when checked. I was able to do that without using a form with the following code:
Private Sub CheckBox1_Click()
If CheckBox1 = True Then
Dim NextCell As Range
'Set NextCell to last unavailable cell beyond D4 (next cell is available)
Set NextCell = Sheet1.Range("B41").End(xlDown)
'Quit if no place to put value (next available cell is beyond row 20)
If NextCell.Row < 32000 And NextCell.Row > 71 Then Exit Sub
If NextCell.Row > 32000 Then Set NextCell = Range("B41")
NextCell.Offset(1).Value = "Thank you for choosing our services...."
End If
End Sub
I dont know what i need to change to make this work on a checkbox thats on a form
Thanks.