stefano
Gebruiker
- Lid geworden
- 22 mei 2004
- Berichten
- 865
Ik gebruik voor de eerste keer een userform. Bedoeling van deze form is waarden in te geven vanaf cel c32, vervolgens e32, g32, ... Zie de code hieronder. Wanneer ik de code oproep worden de gegevens ergens op het blad gedeponeerd. Sturen door gebruik van
Lukt blijkbaar ook niet. Ik wil dus eerste data ingeven in cel C32 . Bekijk bijlage helpmij.nl.xlsmKan iemand helpen aub?
Dank,
Stefano
Code:
ActiveCell.Offset(32, 3).Select
Lukt blijkbaar ook niet. Ik wil dus eerste data ingeven in cel C32 . Bekijk bijlage helpmij.nl.xlsmKan iemand helpen aub?
Dank,
Stefano
Code:
Private Sub CommandButton1_Click()
If TextBox1.Value = "" Or TextBox2.Value = "" Or TextBox3.Value = "" Or TextBox4.Value = "" Or TextBox5.Value = "" Or TextBox6.Value = "" Or TextBox7.Value = "" Or TextBox8.Value = "" Or TextBox9.Value = "" Or TextBox10.Value = "" Then
If MsgBox("Velden zijn niet ingevuld, wil je verder gaan?", vbQuestion + vbYesNo) <> vbYes Then
Exit Sub
End If
End If
ActiveCell = TextBox1.Value
ActiveCell.Offset(0, 1) = TextBox2.Value
ActiveCell.Offset(0, 2) = TextBox3.Value
ActiveCell.Offset(0, 3) = TextBox4.Value
ActiveCell.Offset(0, 4) = TextBox5.Value
ActiveCell.Offset(0, 5) = TextBox6.Value
ActiveCell.Offset(0, 6) = TextBox7.Value
ActiveCell.Offset(0, 7) = TextBox8.Value
ActiveCell.Offset(0, 8) = TextBox9.Value
ActiveCell.Offset(0, 9) = TextBox10.Value
ActiveCell.Offset(32, 3).Select
Call resetform
End Sub
Sub resetform()
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
TextBox8.Value = ""
TextBox9.Value = ""
TextBox10.Value = ""
UserForm1.TextBox1.SetFocus
End Sub