Gruppe
Dialog
Problem
Wie kann ich über einen Dialog Aufmaßdaten eingeben und diese in eine Tabelle eintragen lassen?
StandardModule: basMain
Sub CallForm()
frmAufmass.Show
End Sub
ClassModule: frmAufmass
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
Dim vRow As Variant, vCol As Variant
vCol = Application.Match(TextBox1.Text, Rows(1), 0)
If IsError(vCol) Then
MsgBox "Blatt wurde nicht gefunden!"
Exit Sub
End If
vRow = Application.Match(TextBox2.Text, Columns(1), 0)
If IsError(vRow) Then
MsgBox "LV-Position wurde nicht gefunden!"
Exit Sub
End If
Cells(vRow, vCol).Value = TextBox3.Text
End Sub
Private Sub UserForm_Click()
End Sub
Private Sub UserForm_Initialize()
TextBox1.Value = "Blatt-Nr. 4"
TextBox2.Value = "LV-Position 12"
End Sub