AW: doppelt
05.09.2007 12:06:19
ganz
Hall Renee,
ich kenne mich nicht so aus.
dieser code steht im userform
Kannst du damit was anfangen?
Gruß
ralf
Option Explicit
'
' übernehmen
'
Private Sub CommandButton1_Click()
Dim lLetzte As Long
If TextBox1.Value = "" Then
MsgBox "Die TextBox1 muss eine Eingabe enthalten!", _
48, " Hinweis für " & Application.UserName
TextBox1.SetFocus
Exit Sub
End If
If TextBox2.Value = "" Then
MsgBox "Die TextBox2 muss eine Eingabe enthalten!", _
48, " Hinweis für " & Application.UserName
TextBox2.SetFocus
Exit Sub
End If
If TextBox3.Value = "" Then
MsgBox "Die TextBox3 muss eine Eingabe enthalten!", _
48, " Hinweis für " & Application.UserName
TextBox3.SetFocus
Exit Sub
End If
If TextBox4.Value = "" Then
MsgBox "Die TextBox4 muss eine Eingabe enthalten!", _
48, " Hinweis für " & Application.UserName
TextBox4.SetFocus
Exit Sub
End If
Application.ScreenUpdating = False
With Worksheets("Mandanten")
lLetzte = IIf(.Range("A65536") "", 65536, .Range("A65536").End(xlUp).Row) + 1
If lLetzte
'
' Eingabeinhalte löschen
'
Private Sub CommandButton2_Click()
Dim iIndex As Integer
For iIndex = 1 To 4
With Controls("TextBox" & iIndex)
.Value = ""
End With
Next iIndex
CommandButton4.Enabled = False ' den Änder-Button sperren
End Sub
'
' ändern
'
Private Sub CommandButton4_Click()
Dim lLetzte As Long
If TextBox1.Value = "" Then
MsgBox "Die TextBox1 muss eine Eingabe enthalten!", _
48, " Hinweis für " & Application.UserName
TextBox1.SetFocus
Exit Sub
End If
If TextBox2.Value = "" Then
MsgBox "Die TextBox2 muss eine Eingabe enthalten!", _
48, " Hinweis für " & Application.UserName
TextBox2.SetFocus
Exit Sub
End If
If TextBox3.Value = "" Then
MsgBox "Die TextBox3 muss eine Eingabe enthalten!", _
48, " Hinweis für " & Application.UserName
TextBox3.SetFocus
Exit Sub
End If
If TextBox4.Value = "" Then
MsgBox "Die TextBox4 muss eine Eingabe enthalten!", _
48, " Hinweis für " & Application.UserName
TextBox4.SetFocus
Exit Sub
End If
Application.ScreenUpdating = False
With Worksheets("Mandanten")
.Range("A" & FundZeile).Value = Trim(WorksheetFunction.Proper(TextBox4.Value))
.Range("B" & FundZeile).Value = Trim(WorksheetFunction.Proper(TextBox1.Value))
.Range("C" & FundZeile).Value = Trim(WorksheetFunction.Proper(TextBox2.Value))
.Range("D" & FundZeile).Value = Trim(TextBox3.Value) & " " & _
Trim(WorksheetFunction.Proper(TextBox4.Value))
With .Range("B" & FundZeile & ":D" & FundZeile)
.Font.Name = "Arial"
.Font.Size = 12
End With
With .Range("A" & FundZeile & ":G" & FundZeile)
.Interior.ColorIndex = 9
.Font.ColorIndex = 2
End With
lLetzte = IIf(.Range("A65536") "", 65536, .Range("A65536").End(xlUp).Row) + 1
If lLetzte
Private Sub CommandButton6_Click()
Unload UserForm10
UserForm4.Show
End Sub
'
' schließen
'
Private Sub Image1_Click()
Unload UserForm10
Call Mandantenpflege_anzeigen
End Sub
Private Sub UserForm_Activate()
CommandButton4.Enabled = False ' den Änder-Button sperren
Me.Top = 0
Me.Left = 0
Me.Width = Application.Width
Me.Height = Application.Height
End Sub