Ich habe schon ein mal versucht, einen Code mit Worksheet("Tabelle2").Range("A1") = "Test" zu schreiben. Bei mir hat das nicht funktioniert.
Das ist mein Code. Könnten Sie mal biette mir sagen, wochin soll ich Worksheet("Tabelle2").Range("A1") = "Test" schreiben?
Private Sub CommandButton1_Click()
Dim zn1, zn2, zn3, zn4, zn5, zn6, zn7, zn8, zn9, zn10, l, adr
l = Range("B2").End(xlDown).Row
zn1 = TextBox1.Value
zn2 = TextBox8.Value
zn3 = TextBox2.Value
zn4 = TextBox3.Value
zn5 = TextBox4.Value
zn6 = ComboBox2.Value
zn7 = ComboBox3.Value
zn8 = TextBox5.Value
zn9 = TextBox6.Value
zn10 = TextBox7.Value
l = l + 1
adr = "C" & l
Range(adr).Value = zn1
adr = "D" & l
Range(adr).Value = zn2
adr = "E" & l
Range(adr).Value = zn3
adr = "F" & l
Range(adr).Value = zn4
adr = "G" & l
Range(adr).Value = zn5
adr = "H" & l
Range(adr).Value = zn6
adr = "I" & l
Range(adr).Value = zn7
adr = "J" & l
Range(adr).Value = zn8
adr = "K" & l
Range(adr).Value = zn9
adr = "L" & l
Range(adr).Value = zn10
End Sub
**********///////***********
Private Sub CommandButton2_Click()
UserForm3.Hide
End Sub
******************/////////**********
Private Sub CommandButton3_Click()
Me.TextBox1.Value = " "
Me.TextBox2.Value = " "
Me.TextBox3.Value = " "
Me.TextBox4.Value = " "
Me.TextBox5.Value = " "
Me.TextBox6.Value = " "
Me.TextBox7.Value = " "
Me.TextBox8.Value = " "
Me.ComboBox2.Value = " "
Me.ComboBox3.Value = " "
End Sub
*********//////////***********
Private Sub UserForm_Activate()
Me.ComboBox2.Clear
Me.ComboBox2.AddItem "pdf"
Me.ComboBox2.AddItem "JPEG"
Me.ComboBox2.AddItem "MP3"
Me.ComboBox2.AddItem "JPG"
Me.ComboBox2.AddItem "DOC"
Me.ComboBox2.AddItem "DOCX"
Me.ComboBox2.AddItem "XLS"
Me.ComboBox2.AddItem "XLSX"
Me.ComboBox2.AddItem "ZIP"
Me.ComboBox2.AddItem "RAR"
Me.ComboBox2.AddItem "PNG"
End Sub
|