'''1_1_LmD##########

On Error GoTo EERR

Dim BLATBLAT As Integer

For BLATBLAT = 1 To Worksheets.Count

Worksheets(BLATBLAT).Activate

ActiveWindow.View = xlNormalView

ActiveSheet.AutoFilterMode = False

Next BLATBLAT

Worksheets(1).Activate

UserForm1.Show

Exit Sub

EERR:

'''1_1_LmD##########

 

 

 

 

 

 

 

 

 

 

'''2_2_LmD##########

 

Private Sub CommandButton1_Click()

On Error GoTo EERR

Label1.Visible = False

CommandButton1.Visible = False

CommandButton2.Visible = False

Label2.Visible = True

TextBox1.Visible = True

TextBox1.SetFocus

CommandButton3.Visible = True

EERR:

End Sub

 

Private Sub CommandButton2_Click()

On Error GoTo EERR

Unload Me

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton3_Click()

On Error GoTo EERR

If TextBox1.Value <> "3" Then

MsgBox "Das Kennwort ist falsch!", , "http://excel.hpage.de       Eintrag löschen"

TextBox1.SetFocus

Exit Sub

End If

Unload Me

If ZZFFF2.[n14] = "AKE" Then

UserForm1.TextBox14.Value = ""

UserForm1.TextBox14.Value = "Ja"

End If

If ZZFFF2.[n14] = "LKE" Then

UserForm1.TextBox16.Value = ""

UserForm1.TextBox16.Value = "Ja"

End If

If ZZFFF2.[n14] = "LiKo" Then

UserForm1.TextBox17.Value = ""

UserForm1.TextBox17.Value = "Ja"

End If

If ZZFFF2.[n14] = "KdKo" Then

UserForm1.TextBox27.Value = ""

UserForm1.TextBox27.Value = "Ja"

End If

If ZZFFF2.[n14] = "ZB" Then

UserForm1.TextBox37.Value = ""

UserForm1.TextBox37.Value = "Ja"

End If

If ZZFFF2.[n14] = "GN" Then

UserForm1.TextBox42.Value = ""

UserForm1.TextBox42.Value = "Ja"

End If

If ZZFFF2.[n14] = "BU" Then

UserForm1.TextBox46.Value = ""

UserForm1.TextBox46.Value = "Ja"

End If

If ZZFFF2.[n14] = "ES" Then

UserForm1.TextBox51.Value = ""

UserForm1.TextBox51.Value = "Ja"

End If

If ZZFFF2.[n14] = "ALLESLO" Then

UserForm1.TextBox6.Value = ""

UserForm1.TextBox6.Value = "Ja"

End If

If ZZFFF2.[n14] = "BSATZLO" Then

UserForm1.TextBox5.Value = ""

UserForm1.TextBox5.Value = "Ja"

End If

Exit Sub

EERR:

End Sub

 

Private Sub UserForm_Initialize()

On Error GoTo EERR

Call ZZEUFF

If ZZFFF2.[n14] = "AKE" Then

UserForm2.Caption = "Artikelkonto löschen" & "       http://excel.hpage.de"

Label1.Caption = "Moechten Sie wirklich Artikelkonto_" & ZZFFF2.Cells(8, 28).Value & "_löschen?"

End If

If ZZFFF2.[n14] = "LKE" Then

UserForm2.Caption = "Lagerplatzkonto löschen" & "        http://excel.hpage.de"

Label1.Caption = "Moechten Sie wirklich Lagerplatzkonto_" & ZZFFF2.Cells(8, 28).Value & "_löschen?"

End If

If ZZFFF2.[n14] = "LiKo" Then

UserForm2.Caption = "Lieferantenkonto löschen" & "        http://excel.hpage.de"

Label1.Caption = "Moechten Sie wirklich Lieferantenkonto_" & ZZFFF2.Cells(8, 28).Value & "_löschen?"

End If

If ZZFFF2.[n14] = "KdKo" Then

UserForm2.Caption = "Kundenkonto löschen" & "       http://excel.hpage.de"

Label1.Caption = "Moechten Sie wirklich Kundenkonto_" & ZZFFF2.Cells(8, 28).Value & "_löschen?"

End If

If ZZFFF2.[n14] = "ZB" Then

UserForm2.Caption = "Eintrag löschen" & "       http://excel.hpage.de"

Label1.Caption = "Möchten Sie ID-Nr._" & ZZFFF2.Cells(8, 28).Value & "_löschen?"

End If

If ZZFFF2.[n14] = "GN" Then

UserForm2.Caption = "Eintrag löschen" & "       http://excel.hpage.de"

Label1.Caption = "Möchten Sie ID-Nr._" & ZZFFF2.Cells(8, 28).Value & "_löschen?"

End If

If ZZFFF2.[n14] = "BU" Then

UserForm2.Caption = "Eintrag löschen" & "       http://excel.hpage.de"

Label1.Caption = "Möchten Sie ID-Nr._" & ZZFFF2.Cells(8, 28).Value & "_löschen?"

End If

If ZZFFF2.[n14] = "ES" Then

UserForm2.Caption = "Eintrag löschen" & "       http://excel.hpage.de"

Label1.Caption = "Möchten Sie ID-Nr._" & ZZFFF2.Cells(8, 28).Value & "_löschen?"

End If

If ZZFFF2.[n14] = "ALLESLO" Then

UserForm2.Caption = "Alles löschen" & "       http://excel.hpage.de"

Label1.Caption = "Möchten Sie alle Buchungssätze, Bestände, Zugänge und Entnahmen löschen?"

End If

 

If ZZFFF2.[n14] = "BSATZLO" Then

UserForm2.Caption = "Buchungssätze löschen" & "        http://excel.hpage.de"

Label1.Caption = "Möchten Sie alle Buchungssätze und Entnahmescheine löschen?"

End If

Exit Sub

EERR:

End Sub

 

Sub ZZEUFF()

On Error Resume Next

Dim TSCH As Long

TSCH = 0

TSCH = Label1.Left

If TSCH = 0 Then

MsgBox "Fehler im Schritt 4!", , "http://excel.hpage.de"

End If

TSCH = 0

TSCH = Label2.Left

If TSCH = 0 Then

MsgBox "Fehler im Schritt 5!", , "http://excel.hpage.de"

End If

TSCH = 0

TSCH = TextBox1.Left

If TSCH = 0 Then

MsgBox "Fehler im Schritt 6!", , "http://excel.hpage.de"

End If

TSCH = 0

TSCH = CommandButton1.Left

If TSCH = 0 Then

MsgBox "Fehler im Schritt 7!", , "http://excel.hpage.de"

End If

TSCH = 0

TSCH = CommandButton2.Left

If TSCH = 0 Then

MsgBox "Fehler im Schritt 8!", , "http://excel.hpage.de"

End If

TSCH = 0

TSCH = CommandButton3.Left

If TSCH = 0 Then

MsgBox "Fehler im Schritt 8!", , "http://excel.hpage.de"

End If

TSCH = CommandButton3.Left

If CommandButton3.Visible = True Then

MsgBox "Fehler im Schritt 8!", , "http://excel.hpage.de"

End If

End Sub

'''2_2_LmD##########

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

'''3_3_LmD###########################################################################################################################

Sub AAAUUFAF()

On Error GoTo ERR

TBB1.BackColor = &HC0FFFF

TBB2.BackColor = &HC0FFFF

KuNr.Enabled = True

KuNr.BackColor = &HC0FFFF

Dim IC As String

IC = CoB1

 If CoB1 > "" Then

Sheets(IC).Activate

End If

If ActiveSheet.Name <> "Zailer" And ActiveSheet.Name <> "POMO" Then

Dim AAAZ As Variant

Dim AAAC As Variant

POMO.[a2] = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row

POMO.[a3] = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Column

AAAZ = CDbl(POMO.[a2])

AAAC = CDbl(POMO.[a3])

SPALTA1 = ""

SPALTA2 = ""

SPALTA3 = ""

SPALTA4 = ""

SPALTA5 = ""

SPALTA6 = ""

SPALTA7 = ""

SPALTB1 = ""

SPALTB2 = ""

SPALTB3 = ""

SPALTB4 = ""

SPALTB5 = ""

SPALTB6 = ""

SPALTB7 = ""

SPALTC1 = ""

SPALTC2 = ""

SPALTC3 = ""

SPALTC4 = ""

SPALTC5 = ""

SPALTC6 = ""

SPALTC7 = ""

SPALTD1 = ""

SPALTD2 = ""

SPALTD3 = ""

SPALTD4 = ""

SPALTD5 = ""

SPALTD6 = ""

SPALTD7 = ""

SPALTE1 = ""

SPALTE2 = ""

SPALTE3 = ""

SPALTE4 = ""

SPALTE5 = ""

SPALTE6 = ""

SPALTE7 = ""

SPALTF1 = ""

SPALTF2 = ""

SPALTF3 = ""

SPALTF4 = ""

SPALTF5 = ""

SPALTF6 = ""

SPALTF7 = ""

SPALTG1 = ""

SPALTG2 = ""

SPALTG3 = ""

SPALTG4 = ""

SPALTG5 = ""

SPALTG6 = ""

SPALTG7 = ""

SPALTA = ""

SPALTB = ""

SPALTC = ""

SPALTD = ""

SPALTE = ""

SPALTF = ""

SPALTG = ""

KuNr = ""

TBB1.Value = ""

TBB2.Value = ""

TBB3.Value = ""

TBB4.Value = ""

TBB5.Value = ""

TBB6.Value = ""

POMO.[a1] = ""

POMO.[b1] = ""

POMO.[c1] = ""

POMO.[d1] = ""

POMO.[e1] = ""

POMO.[F1] = ""

POMO.[g1] = ""

POMO.[h1] = ""

POMO.[i1] = ""

POMO.[j1] = ""

POMO.[k1] = ""

POMO.[L1] = ""

POMO.[m1] = ""

If POMO.[a2] < 65536 Then

Dim ††† As Variant

If POMO.[a3] = 1 Then

POMO.[a4] = 0

††† = POMO.[a4]

End If

If POMO.[a3] = 7 Then

POMO.[a4] = 6

††† = POMO.[a4]

End If

SPALTA = ActiveSheet.Cells(1, AAAC - †††).Value

SPALTB = ActiveSheet.Cells(1, AAAC + 1).Value

SPALTC = ActiveSheet.Cells(1, AAAC + 2).Value

SPALTD = ActiveSheet.Cells(1, AAAC + 3).Value

SPALTE = ActiveSheet.Cells(1, AAAC + 4).Value

SPALTF = ActiveSheet.Cells(1, AAAC + 5).Value

SPALTG = ActiveSheet.Cells(1, AAAC + 6).Value

If POMO.[a2] > 8 Then

SPALTA1 = ActiveSheet.Cells(AAAZ - 6, AAAC - †††).Value

SPALTB1 = ActiveSheet.Cells(AAAZ - 6, AAAC + 1).Value

SPALTC1 = ActiveSheet.Cells(AAAZ - 6, AAAC + 2).Value

SPALTD1 = ActiveSheet.Cells(AAAZ - 6, AAAC + 3).Value

SPALTE1 = ActiveSheet.Cells(AAAZ - 6, AAAC + 4).Value

SPALTF1 = ActiveSheet.Cells(AAAZ - 6, AAAC + 5).Value

SPALTG1 = ActiveSheet.Cells(AAAZ - 6, AAAC + 6).Value

End If

If POMO.[a2] > 7 Then

SPALTA2 = ActiveSheet.Cells(AAAZ - 5, AAAC - †††).Value

SPALTB2 = ActiveSheet.Cells(AAAZ - 5, AAAC + 1).Value

SPALTC2 = ActiveSheet.Cells(AAAZ - 5, AAAC + 2).Value

SPALTD2 = ActiveSheet.Cells(AAAZ - 5, AAAC + 3).Value

SPALTE2 = ActiveSheet.Cells(AAAZ - 5, AAAC + 4).Value

SPALTF2 = ActiveSheet.Cells(AAAZ - 5, AAAC + 5).Value

SPALTG2 = ActiveSheet.Cells(AAAZ - 5, AAAC + 6).Value

End If

If POMO.[a2] > 6 Then

SPALTA3 = ActiveSheet.Cells(AAAZ - 4, AAAC - †††).Value

SPALTB3 = ActiveSheet.Cells(AAAZ - 4, AAAC + 1).Value

SPALTC3 = ActiveSheet.Cells(AAAZ - 4, AAAC + 2).Value

SPALTD3 = ActiveSheet.Cells(AAAZ - 4, AAAC + 3).Value

SPALTE3 = ActiveSheet.Cells(AAAZ - 4, AAAC + 4).Value

SPALTF3 = ActiveSheet.Cells(AAAZ - 4, AAAC + 5).Value

SPALTG3 = ActiveSheet.Cells(AAAZ - 4, AAAC + 6).Value

End If

If POMO.[a2] > 5 Then

SPALTA4 = ActiveSheet.Cells(AAAZ - 3, AAAC - †††).Value

SPALTB4 = ActiveSheet.Cells(AAAZ - 3, AAAC + 1).Value

SPALTC4 = ActiveSheet.Cells(AAAZ - 3, AAAC + 2).Value

SPALTD4 = ActiveSheet.Cells(AAAZ - 3, AAAC + 3).Value

SPALTE4 = ActiveSheet.Cells(AAAZ - 3, AAAC + 4).Value

SPALTF4 = ActiveSheet.Cells(AAAZ - 3, AAAC + 5).Value

SPALTG4 = ActiveSheet.Cells(AAAZ - 3, AAAC + 6).Value

End If

If POMO.[a2] > 4 Then

SPALTA5 = ActiveSheet.Cells(AAAZ - 2, AAAC - †††).Value

SPALTB5 = ActiveSheet.Cells(AAAZ - 2, AAAC + 1).Value

SPALTC5 = ActiveSheet.Cells(AAAZ - 2, AAAC + 2).Value

SPALTD5 = ActiveSheet.Cells(AAAZ - 2, AAAC + 3).Value

SPALTE5 = ActiveSheet.Cells(AAAZ - 2, AAAC + 4).Value

SPALTF5 = ActiveSheet.Cells(AAAZ - 2, AAAC + 5).Value

SPALTG5 = ActiveSheet.Cells(AAAZ - 2, AAAC + 6).Value

End If

If POMO.[a2] > 3 Then

SPALTA6 = ActiveSheet.Cells(AAAZ - 1, AAAC - †††).Value

SPALTB6 = ActiveSheet.Cells(AAAZ - 1, AAAC + 1).Value

SPALTC6 = ActiveSheet.Cells(AAAZ - 1, AAAC + 2).Value

SPALTD6 = ActiveSheet.Cells(AAAZ - 1, AAAC + 3).Value

SPALTE6 = ActiveSheet.Cells(AAAZ - 1, AAAC + 4).Value

SPALTF6 = ActiveSheet.Cells(AAAZ - 1, AAAC + 5).Value

SPALTG6 = ActiveSheet.Cells(AAAZ - 1, AAAC + 6).Value

End If

If POMO.[a2] > 2 Then

SPALTA7 = ActiveSheet.Cells(AAAZ, AAAC - †††).Value

SPALTB7 = ActiveSheet.Cells(AAAZ, AAAC + 1).Value

SPALTC7 = ActiveSheet.Cells(AAAZ, AAAC + 2).Value

SPALTD7 = ActiveSheet.Cells(AAAZ, AAAC + 3).Value

SPALTE7 = ActiveSheet.Cells(AAAZ, AAAC + 4).Value

SPALTF7 = ActiveSheet.Cells(AAAZ, AAAC + 5).Value

SPALTG7 = ActiveSheet.Cells(AAAZ, AAAC + 6).Value

End If

 End If

 End If

If ActiveSheet.Name <> "Zailer" And ActiveSheet.Name <> "POMO" Then

TANA = ActiveSheet.Name

End If

Exit Sub

ERR:

End Sub

 

 

Private Sub CommandButton9_Click()

On Error GoTo EERR

ZZFFF2.[n14] = "ALLESLO"

CommandButton12.Visible = False

UserForm2.Show

Exit Sub

EERR:

 

End Sub

 

Private Sub TextBox6_Change()

On Error GoTo EERR

If TextBox6.Value <> "" Then

ZZFFF2.Range("a8:bx1048571").Value = ""

ZZFFF3.Range("f2:i1261").Value = ""

ZZFFF3.Range("m2:fcc1048571").Value = ""

ZZFFF3.Range("c1270:xfa1048571").Value = ""

ZZFFF4.Range("b1:mag7").Value = ""

ZZFFF4.Range("b9:mag1048571").Value = ""

ZZFFF5.Range("c2:loz2048").Value = ""

ZZFFF6.Range("b1:xew3").Value = ""

ZZFFF6.Range("b5:xew1048571").Value = ""

ZZFFF7.Range("m2:qhe3001").Value = ""

ZZFFF8.Range("m2:olt1048571").Value = ""

ZZFFF9.Range("a2:tg1048571").Value = ""

ZZFFF1.Activate

MsgBox "Alles ist gelöscht!", 48, "http://excel.hpage.de    "

End If

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton10_Click()

On Error GoTo EERR

Dim DDNN As Variant

Dim AAPP As Long

Dim AAAZ As Long

Dim AAAC As Long

Unload Me

DDNN = MsgBox("" & "Moechten Sie wirklich alles löschen?" & " " & "", vbYesNo, "http://excel.hpage.de      Alles löschen")

If DDNN = vbNo Then

Exit Sub

Else

End If

DDNN = Application.InputBox("Kennwort:", "http://excel.hpage.de       Alles löschen")

If DDNN <> 3 Then

MsgBox "Das Kennwort ist falsch!", , "http://excel.hpage.de       Alles löschen"

Exit Sub

Else

End If

ZZFFF2.Range("a8:bx100100").Value = ""

ZZFFF3.Range("b2:j1261").Value = ""

ZZFFF3.Range("m2:fcc1048571").Value = ""

ZZFFF3.Range("c1270:xfa1048571").Value = ""

ZZFFF4.Range("b1:mag7").Value = ""

ZZFFF4.Range("b9:mag1048571").Value = ""

ZZFFF5.Range("c2:loz2048").Value = ""

ZZFFF5.Range("b2:b2048").Value = ""

ZZFFF6.Range("b1:xew3").Value = ""

ZZFFF6.Range("b5:xew1048571").Value = ""

ZZFFF7.Range("m2:qhe3001").Value = ""

ZZFFF7.Range("b2:l3001").Value = ""

ZZFFF8.Range("m2:olt50010").Value = ""

ZZFFF8.Range("b2:l50010").Value = ""

ZZFFF9.Range("a2:tg100000").Value = ""

ZZFFF1.Activate

MsgBox "Alles ist gelöscht!", 48, "http://excel.hpage.de    "

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox37_Change()

On Error GoTo EERR

Dim AAAZ As Long

Label216.Caption = ""

Label218.Caption = ""

If ComboBox37.Value <> "" Then

AAAZ = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox37.Value, lookat:=xlWhole).Row)

End If

Call ZLIPA2

If TextBox1.Value = "ComboBox37" Then

If ComboBox37.Value <> "" Then

ListBox6.ListIndex = ComboBox37.ListIndex

Else:

ListBox6.ListIndex = ListBox6.ListCount - 1

End If

Label191.Visible = True

ComboBox38.Visible = True

ComboBox38.Clear

With ComboBox38

.AddItem "Lagerplatzkonto"

.AddItem "Lagerplatz/Artikeln"

.AddItem "Lagerplatz/Lieferanten"

End With

End If

Exit Sub

EERR:

ComboBox37.Value = ""

End Sub

 

Private Sub ComboBox37_Enter()

On Error GoTo EERR

TextBox1.Value = "ComboBox37"

ListBox6.ColumnWidths = ""

ListBox6.BoundColumn = 3

ListBox6.ColumnCount = 3

ListBox6.BackColor = &H80FF80

With ZZFFF5

ListBox6.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 4)).Address(External:=True)

End With

If ComboBox37.Value <> "" Then

ListBox6.ListIndex = ComboBox37.ListIndex

Else:

ListBox6.ListIndex = ListBox6.ListCount - 1

End If

Label191.Visible = True

ComboBox38.Visible = True

ComboBox38.BackColor = &H80FF80

ComboBox38.Clear

With ComboBox38

.AddItem "Lagerplatzkonto"

.AddItem "Lagerplatz/Artikeln"

.AddItem "Lagerplatz/Lieferanten"

End With

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton12_Click()

On Error GoTo EERR

ZZFFF2.[n14] = "AKE"

CommandButton12.Visible = False

UserForm2.Show

Exit Sub

EERR:

End Sub

 

Private Sub TextBox14_Change()

On Error GoTo EERR

If TextBox14.Value <> "" Then

Dim AAPP As Long

Dim AAAZ As Long

Dim AAAC As Long

AAAZ = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox1.Value, lookat:=xlWhole).Row)

AAPP = ComboBox1.ListIndex + 2

If ZZFFF3.Cells(AAPP, 6) <> "" Then

MsgBox "Bestand von diesem Artikelkonto ist mehr als Null, es kann nicht gelöscht werden!", 48, "http://excel.hpage.de    "

ComboBox1.SetFocus

Exit Sub

End If

AAAC = (AAPP - 2) * 7 + 2

ZZFFF4.Cells(9, AAAC) = "_"

AAAZ = CDbl(ZZFFF4.Cells(Rows.Count, AAAC).End(xlUp).Row)

ZZFFF4.Activate

ZZFFF4.Range(Cells(1, AAAC), Cells(7, AAAC + 6)).Value = ""

ZZFFF4.Range(Cells(9, AAAC), Cells(AAAZ, AAAC + 6)).Value = ""

ZZFFF3.Activate

TextBox2.Value = ComboBox1.Value

ZZFFF3.Range(Cells(AAPP, 2), Cells(AAPP, 10139)).Value = ""

ZZFFF1.Activate

MsgBox "Artikelkonto " & TextBox2.Value & " ist gelöscht!", 48, "http://excel.hpage.de    "

TextBox14.Value = ""

With ZZFFF3

ComboBox1.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 2)).Address(External:=True)

End With

With ZZFFF3

ListBox1.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 8)).Address(External:=True)

End With

If ComboBox1.Value <> "" Then

ListBox1.ListIndex = ComboBox1.ListIndex

Else:

ListBox1.ListIndex = ListBox1.ListCount - 1

End If

End If

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox1_Change()

On Error GoTo EERR

Dim AAPP As Long

Dim AAAZ As Long

Dim AAPP2 As Long

Dim DDAATT As String

ListBox1.BoundColumn = 7

ListBox1.ColumnCount = 7

CommandButton16.Visible = False

CommandButton17.Visible = False

Image1.Visible = False

CommandButton12.Visible = False

ZZFFF2.[ab8] = ""

If ComboBox1.Value <> "" Then

CommandButton12.Visible = True

ZZFFF2.[ab8] = ComboBox1.Value

End If

ListBox1.ListIndex = ListBox1.ListCount - 1

DDAATT = ""

Image1.Picture = LoadPicture(DDAATT)

TextBox7.Value = ""

TextBox8.Value = ""

TextBox9.Value = ""

ComboBox3.Value = ""

If TextBox1.Value = "ComboBox1" Then

CommandButton18.Visible = False

Label11.Visible = False

ComboBox3.Visible = False

If ComboBox1.Value <> "" Then

CommandButton16.Visible = True

CommandButton17.Visible = True

Image1.Visible = True

CommandButton18.Visible = True

Label11.Visible = True

ComboBox3.Visible = True

ComboBox3.BackColor = &HFFFFC0

ComboBox3.Clear

With ComboBox3

.AddItem "Zugang"

.AddItem "Entnahme"

.AddItem "Artikelkonto"

.AddItem "Artikel/Lagerplätze"

.AddItem "Artikel/Lieferanten"

.AddItem "Artikel/Lieferant/Lagerplätze"

End With

ComboBox2.Value = ""

AAAZ = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox1.Value, lookat:=xlWhole).Row)

AAPP = ComboBox1.ListIndex + 2

TextBox7.Value = ZZFFF3.Cells(AAPP, 3).Value

TextBox8.Value = ZZFFF3.Cells(AAPP, 4).Value

TextBox9.Value = ZZFFF3.Cells(AAPP, 5).Value

ListBox1.BackColor = &HFFFFC0

With ZZFFF3

ListBox1.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 8)).Address(External:=True)

End With

If ComboBox1.Value <> "" Then

ListBox1.ListIndex = ComboBox1.ListIndex

Else:

ListBox1.ListIndex = ListBox1.ListCount - 1

End If

End If

On Error Resume Next

If TextBox1.Value = "ComboBox1" Then

DDAATT = ""

Image1.Picture = LoadPicture(DDAATT)

AAPP2 = ComboBox1.ListIndex + 2

DDAATT = ZZFFF3.Cells(AAPP2, 10).Value

Image1.Picture = LoadPicture(DDAATT)

End If

End If

Exit Sub

EERR:

ComboBox1.Value = ""

End Sub

 

Private Sub ComboBox1_Enter()

On Error GoTo EERR

ListBox1.BoundColumn = 7

ListBox1.ColumnCount = 7

ListBox1.BackColor = &HFFFFC0

With ZZFFF3

ListBox1.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 8)).Address(External:=True)

End With

If ComboBox1.Value <> "" Then

ListBox1.ListIndex = ComboBox1.ListIndex

Else:

ListBox1.ListIndex = ListBox1.ListCount - 1

End If

Exit Sub

EERR:

End Sub

 

Private Sub TextBox10_Exit(ByVal Cancel As MSForms.ReturnBoolean)

On Error GoTo EERR

Dim AAAZ As Long

If CheckBox1 = True Then

If TextBox10.Value <> "" Then

AAAZ = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=TextBox10.Value, lookat:=xlWhole).Row)

MsgBox "Solche Artikelnummer existiert schon!", 48, "http://excel.hpage.de   "

TextBox10.Value = ""

TextBox10.SetFocus

End If

End If

If CheckBox2 = True Then

If TextBox10.Value <> "" Then

If ComboBox1.Value <> "" Then

If TextBox10.Value <> ComboBox1.Value Then

AAAZ = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=TextBox10.Value, lookat:=xlWhole).Row)

MsgBox "Solche Artikelnummer existiert schon!", 48, "http://excel.hpage.de   "

TextBox10.Value = ""

TextBox10.SetFocus

End If

End If

End If

End If

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox33_Change()

On Error GoTo EERR

Dim AAPP2 As Long

Dim AAAZ As Long

Dim DDAATT As String

Dim AAPP As Long

Dim AAAC As Long

Dim SCHOT As Long

DDAATT = ""

Image4.Picture = LoadPicture(DDAATT)

ComboBox35.Clear

ComboBox36.Clear

If ComboBox33.Value <> "" Then

AAAZ = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox33.Value, lookat:=xlWhole).Row)

ComboBox34.Value = ZZFFF3.Cells(AAAZ, 3).Value

AAPP = ComboBox33.ListIndex + 2

AAPP = ComboBox33.ListIndex * 2 + 45

For SCHOT = 2 To 3001

If ZZFFF7.Cells(SCHOT, AAPP) <> "" Then

With ComboBox35

.AddItem ZZFFF7.Cells(SCHOT, 2).Value

End With

End If

Next SCHOT

For SCHOT = 1 To 2047

AAAC = 44 + ((SCHOT - 1) * 2)

If ZZFFF3.Cells(AAPP, AAAC) <> "" Then

With ComboBox36

.AddItem ZZFFF5.Cells(SCHOT + 1, 2).Value

End With

End If

Next SCHOT

Else:

ComboBox34.Value = ""

End If

Call ZLIPA2

If TextBox1.Value = "ComboBox33" Then

If ComboBox33.Value <> "" Then

ListBox6.ListIndex = ComboBox33.ListIndex

Else:

ListBox6.ListIndex = ListBox6.ListCount - 1

End If

If ComboBox33.Value <> "" Then

Label191.Visible = True

ComboBox38.Visible = True

ComboBox38.Clear

With ComboBox38

.AddItem "Zugang"

.AddItem "Entnahme"

.AddItem "Artikelkonto"

.AddItem "Artikel/Lagerplätze"

.AddItem "Artikel/Lieferanten"

.AddItem "Artikel/Lieferant/Lagerplätze"

End With

Else:

End If

End If

On Error Resume Next

DDAATT = ""

Image4.Picture = LoadPicture(DDAATT)

AAPP2 = ComboBox33.ListIndex + 2

DDAATT = ZZFFF3.Cells(AAPP2, 10).Value

Image4.Picture = LoadPicture(DDAATT)

Exit Sub

EERR:

ComboBox33.Value = ""

End Sub

 

Private Sub ComboBox33_Enter()

On Error GoTo EERR

TextBox1.Value = "ComboBox33"

ListBox6.ColumnWidths = ""

ListBox6.BoundColumn = 7

ListBox6.ColumnCount = 7

ListBox6.BackColor = &HFFFFC0

With ZZFFF3

ListBox6.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 8)).Address(External:=True)

End With

If ComboBox33.Value <> "" Then

ListBox6.ListIndex = ComboBox33.ListIndex

Else:

ListBox6.ListIndex = ListBox6.ListCount - 1

End If

Label191.Visible = True

ComboBox38.Visible = True

ComboBox38.BackColor = &HFFFFC0

ComboBox38.Clear

With ComboBox38

.AddItem "Zugang"

.AddItem "Entnahme"

.AddItem "Artikelkonto"

.AddItem "Artikel/Lagerplätze"

.AddItem "Artikel/Lieferanten"

.AddItem "Artikel/Lieferant/Lagerplätze"

End With

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox43_Change()

On Error GoTo EERR

Dim AAPP2 As Long

Dim AAAZ As Long

Dim DDAATT As String

Dim AAPP As Long

Dim AAAC As Long

Dim SCHOT As Long

DDAATT = ""

Image5.Picture = LoadPicture(DDAATT)

ComboBox45.Clear

ComboBox46.Clear

If ComboBox43.Value <> "" Then

AAAZ = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox43.Value, lookat:=xlWhole).Row)

ComboBox44.Value = ZZFFF3.Cells(AAAZ, 3).Value

AAPP = ComboBox43.ListIndex + 2

AAPP = ComboBox43.ListIndex * 2 + 45

For SCHOT = 2 To 3001

If ZZFFF7.Cells(SCHOT, AAPP) <> "" Then

With ComboBox45

.AddItem ZZFFF7.Cells(SCHOT, 2).Value

End With

End If

Next SCHOT

For SCHOT = 1 To 2047

AAAC = 44 + ((SCHOT - 1) * 2)

If ZZFFF3.Cells(AAPP, AAAC) <> "" Then

With ComboBox46

.AddItem ZZFFF5.Cells(SCHOT + 1, 2).Value

End With

End If

Next SCHOT

Else:

ComboBox44.Value = ""

End If

Call ZLIPA2

If TextBox1.Value = "ComboBox43" Then

ComboBox45.Value = ""

ComboBox46.Value = ""

If ComboBox43.Value <> "" Then

ListBox7.ListIndex = ComboBox43.ListIndex

Else:

ListBox7.ListIndex = ListBox7.ListCount - 1

End If

If ComboBox43.Value <> "" Then

Label254.Visible = True

ComboBox47.Visible = True

ComboBox47.Clear

With ComboBox47

.AddItem "Zugang"

.AddItem "Entnahme"

.AddItem "Artikelkonto"

.AddItem "Artikel/Lagerplätze"

.AddItem "Artikel/Lieferanten"

.AddItem "Artikel/Lieferant/Lagerplätze"

End With

Else:

End If

End If

On Error Resume Next

DDAATT = ""

Image5.Picture = LoadPicture(DDAATT)

AAPP2 = ComboBox43.ListIndex + 2

DDAATT = ZZFFF3.Cells(AAPP2, 10).Value

Image5.Picture = LoadPicture(DDAATT)

Exit Sub

EERR:

ComboBox43.Value = ""

End Sub

 

Private Sub ComboBox43_Enter()

On Error GoTo EERR

TextBox1.Value = "ComboBox43"

ListBox7.BoundColumn = 7

ListBox7.ColumnCount = 7

ListBox7.BackColor = &HFFFFC0

With ZZFFF3

ListBox7.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 8)).Address(External:=True)

End With

If ComboBox43.Value <> "" Then

ListBox7.ListIndex = ComboBox43.ListIndex

Else:

ListBox7.ListIndex = ListBox7.ListCount - 1

End If

Label254.Visible = True

ComboBox47.Visible = True

ComboBox47.BackColor = &HFFFFC0

ComboBox47.Clear

With ComboBox47

.AddItem "Zugang"

.AddItem "Entnahme"

.AddItem "Artikelkonto"

.AddItem "Artikel/Lagerplätze"

.AddItem "Artikel/Lieferanten"

.AddItem "Artikel/Lieferant/Lagerplätze"

End With

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox27_Change()

On Error GoTo EERR

Dim AAPP2 As Long

Dim AAPP3 As Long

Dim DDAATT As String

Dim AAAC As Long

Dim AAAZ As Long

Dim SCHOT As Long

ComboBox29.Clear

DDAATT = ""

Image3.Picture = LoadPicture(DDAATT)

If ComboBox27.Value <> "" Then

AAPP2 = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox27.Value, lookat:=xlWhole).Row)

ComboBox28.Value = ZZFFF3.Cells(AAPP2, 3).Value

AAPP3 = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox26.Value, lookat:=xlWhole).Row) - 2

AAAZ = ZZFFF3.Cells(AAPP2, 16383) + AAPP3

AAAC = ZZFFF3.Cells(AAPP2, 16384)

For SCHOT = 2 To 2048

If ZZFFF3.Cells(AAAZ, AAAC + (2 * (SCHOT - 2))) > 0 Then

With ComboBox29

.AddItem ZZFFF5.Cells(SCHOT, 2).Value

End With

End If

Next SCHOT

Else:

ComboBox28.Value = ""

End If

Call ZLIPA2

If TextBox1.Value = "ComboBox27" Then

If ComboBox27.Value <> "" Then

ListBox5.ListIndex = AAPP2 - 2

Else:

ListBox5.ListIndex = ListBox5.ListCount - 1

End If

If ComboBox27.Value <> "" Then

Label128.Visible = True

ComboBox30.Visible = True

ComboBox30.Clear

With ComboBox30

.AddItem "Zugang"

.AddItem "Entnahme"

.AddItem "Artikelkonto"

.AddItem "Artikel/Lagerplätze"

.AddItem "Artikel/Lieferanten"

.AddItem "Artikel/Lieferant/Lagerplätze"

End With

End If

End If

On Error Resume Next

DDAATT = ""

Image3.Picture = LoadPicture(DDAATT)

DDAATT = ZZFFF3.Cells(AAPP2, 10).Value

Image3.Picture = LoadPicture(DDAATT)

Exit Sub

EERR:

ComboBox27.Value = ""

End Sub

 

Private Sub ComboBox27_Enter()

On Error GoTo EERR

Dim AAAZ As Long

TextBox1.Value = "ComboBox27"

ListBox5.ColumnWidths = ""

ListBox5.BoundColumn = 7

ListBox5.ColumnCount = 7

ListBox5.BackColor = &HFFFFC0

If ComboBox27.Value <> "" Then

AAAZ = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox27.Value, lookat:=xlWhole).Row)

End If

With ZZFFF3

ListBox5.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 8)).Address(External:=True)

End With

If ComboBox27.Value <> "" Then

ListBox5.ListIndex = AAAZ - 2

Else:

ListBox5.ListIndex = ListBox5.ListCount - 1

End If

Label128.Visible = True

ComboBox30.Visible = True

ComboBox30.BackColor = &HFFFFC0

ComboBox30.Clear

With ComboBox30

.AddItem "Zugang"

.AddItem "Entnahme"

.AddItem "Artikelkonto"

.AddItem "Artikel/Lagerplätze"

.AddItem "Artikel/Lieferanten"

.AddItem "Artikel/Lieferant/Lagerplätze"

End With

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox18_Change()

On Error GoTo EERR

Dim AAPP2 As Long

Dim AAAZ As Long

Dim DDAATT As String

ComboBox21.Clear

DDAATT = ""

Image2.Picture = LoadPicture(DDAATT)

If ComboBox18.Value <> "" Then

AAAZ = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox18.Value, lookat:=xlWhole).Row)

ComboBox19.Value = ZZFFF3.Cells(AAAZ, 3).Value

Else:

ComboBox19.Value = ""

End If

Call ZLIPA2

If TextBox1.Value = "ComboBox18" Then

If ComboBox18.Value <> "" Then

ListBox4.ListIndex = ComboBox18.ListIndex

Else:

ListBox4.ListIndex = ListBox4.ListCount - 1

End If

If ComboBox18.Value <> "" Then

Label66.Visible = True

ComboBox23.Visible = True

ComboBox23.Clear

With ComboBox23

.AddItem "Zugang"

.AddItem "Entnahme"

.AddItem "Artikelkonto"

.AddItem "Artikel/Lagerplätze"

.AddItem "Artikel/Lieferanten"

.AddItem "Artikel/Lieferant/Lagerplätze"

End With

End If

End If

On Error Resume Next

DDAATT = ""

Image2.Picture = LoadPicture(DDAATT)

AAPP2 = ComboBox18.ListIndex + 2

DDAATT = ZZFFF3.Cells(AAPP2, 10).Value

Image2.Picture = LoadPicture(DDAATT)

Exit Sub

EERR:

ComboBox18.Value = ""

End Sub

 

Private Sub ComboBox18_Enter()

On Error GoTo EERR

TextBox1.Value = "ComboBox18"

ListBox4.ColumnWidths = ""

ListBox4.BoundColumn = 7

ListBox4.ColumnCount = 7

ListBox4.BackColor = &HFFFFC0

With ZZFFF3

ListBox4.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 8)).Address(External:=True)

End With

If ComboBox18.Value <> "" Then

ListBox4.ListIndex = ComboBox18.ListIndex

Else:

ListBox4.ListIndex = ListBox4.ListCount - 1

End If

Label66.Visible = True

ComboBox23.Visible = True

ComboBox23.BackColor = &HFFFFC0

ComboBox23.Clear

With ComboBox23

.AddItem "Zugang"

.AddItem "Entnahme"

.AddItem "Artikelkonto"

.AddItem "Artikel/Lagerplätze"

.AddItem "Artikel/Lieferanten"

.AddItem "Artikel/Lieferant/Lagerplätze"

End With

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox21_Change()

On Error GoTo EERR

Dim AAPP As Long

Dim AAAC As Long

Dim AAAZ As Long

Label89.Caption = ""

Label90.Caption = ""

Label91.Caption = ""

If ComboBox21.Value <> "" Then

AAAZ = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox21.Value, lookat:=xlWhole).Row)

AAPP = ComboBox18.ListIndex + 2

AAAC = 44 + ((AAAZ - 2) * 2)

Label89.Caption = ZZFFF3.Cells(AAPP, AAAC)

Label90.Caption = ZZFFF3.Cells(AAPP, AAAC + 1)

If ZZFFF3.Cells(AAPP, AAAC) <> "" And ZZFFF3.Cells(AAPP, AAAC) <> 0 Then

Label91.Caption = Round(ZZFFF3.Cells(AAPP, AAAC + 1) / ZZFFF3.Cells(AAPP, AAAC), 2)

End If

If TextBox1.Value = "ComboBox21" Then

ComboBox22.Value = ComboBox21.Value

End If

If Label90.Caption = "" Then

ComboBox21.Value = ""

End If

End If

Exit Sub

EERR:

ComboBox21.Value = ""

End Sub

 

Private Sub ComboBox21_Enter()

On Error GoTo EERR

TextBox1.Value = "ComboBox21"

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox10_Change()

On Error GoTo EERR

Dim AAAZ As Long

TextBox2.Value = ""

If ComboBox10.Value <> "" Then

AAAZ = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox10.Value, lookat:=xlWhole).Row)

End If

TextBox2.Value = AAAZ

ListBox2.BoundColumn = 7

ListBox2.ColumnCount = 7

If TextBox2.Value = "ComboBox10" Then

ListBox2.BackColor = &HFFFFC0

TextBox2.Value = ""

End If

With ZZFFF3

ListBox2.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 8)).Address(External:=True)

End With

If ComboBox10.Value <> "" Then

ListBox2.ListIndex = AAAZ - 2

Else:

ListBox2.ListIndex = ListBox2.ListCount - 1

End If

Exit Sub

EERR:

ComboBox10.Value = ""

End Sub

 

Private Sub ComboBox10_Enter()

On Error GoTo EERR

Dim AAAZ As Long

TextBox2.Value = ""

If ComboBox10.Value <> "" Then

AAAZ = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox10.Value, lookat:=xlWhole).Row)

TextBox2.Value = "ComboBox10"

End If

TextBox2.Value = AAAZ

ListBox2.BoundColumn = 7

ListBox2.ColumnCount = 7

ListBox2.BackColor = &HFFFFC0

With ZZFFF3

ListBox2.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 8)).Address(External:=True)

End With

If ComboBox10.Value <> "" Then

ListBox2.ListIndex = AAAZ - 2

Else:

ListBox2.ListIndex = ListBox2.ListCount - 1

End If

Exit Sub

EERR:

ComboBox10.Value = ""

End Sub

 

Private Sub ComboBox3_Change()

On Error GoTo EERR

Dim AAPP As Long

Dim SCHOT As Long

Label12.Visible = False

ComboBox4.Visible = False

ComboBox4.Value = ""

If ComboBox3.Value = "Artikel/Lieferant/Lagerplätze" Then

Label12.Visible = True

ComboBox4.Visible = True

If ComboBox1.Value <> "" Then

AAPP = ComboBox1.ListIndex * 2 + 45

ComboBox4.Clear

For SCHOT = 2 To 3001

If ZZFFF7.Cells(SCHOT, AAPP) <> "" Then

With ComboBox4

.AddItem ZZFFF7.Cells(SCHOT, 2).Value

End With

End If

Next SCHOT

End If

End If

Exit Sub

EERR:

End Sub

 

Private Sub TextBox38_Enter()

On Error GoTo EERR

Dim AAAZ As Long

If ComboBox16.Value <> "" Then

AAAZ = CDbl(ZZFFF2.Range("a7:b1048571").Cells.Find(What:=ComboBox16.Value, lookat:=xlWhole).Row)

End If

TextBox1.Value = "ComboBox16"

ComboBox23.BackColor = &HFFFFFF

ComboBox23.Value = ""

ListBox4.BoundColumn = 11

ListBox4.ColumnCount = 11

ListBox4.BackColor = &HFFFFFF

ListBox4.ColumnWidths = "50;80;60;80;100;40;60;60;60;80;40"

With ZZFFF2

ListBox4.RowSource = .Range(.Cells(8, 1), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 11)).Address(External:=True)

End With

If ComboBox16.Value <> "" Then

ListBox4.ListIndex = AAAZ - 8

Else:

ListBox4.ListIndex = ListBox4.ListCount - 1

End If

Label66.Visible = False

ComboBox23.Visible = False

Exit Sub

EERR:

End Sub

 

Private Sub TextBox47_Enter()

On Error GoTo EERR

Dim AAAZ As Long

If ComboBox32.Value <> "" Then

AAAZ = CDbl(ZZFFF2.Range("a7:b1048571").Cells.Find(What:=ComboBox32.Value, lookat:=xlWhole).Row)

End If

ComboBox38.BackColor = &HFFFFFF

ComboBox38.Value = ""

ListBox6.BoundColumn = 11

ListBox6.ColumnCount = 11

ListBox6.BackColor = &HFFFFFF

ListBox6.ColumnWidths = "50;80;60;80;100;40;60;60;60;80;40"

With ZZFFF2

ListBox6.RowSource = .Range(.Cells(8, 1), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 11)).Address(External:=True)

End With

If ComboBox32.Value <> "" Then

ListBox6.ListIndex = AAAZ - 8

Else:

ListBox6.ListIndex = ListBox6.ListCount - 1

End If

Label191.Visible = False

ComboBox38.Visible = False

Exit Sub

EERR:

End Sub

 

Private Sub TextBox43_Enter()

On Error GoTo EERR

Dim AAAZ As Long

If ComboBox25.Value <> "" Then

AAAZ = CDbl(ZZFFF2.Range("a7:b1048571").Cells.Find(What:=ComboBox25.Value, lookat:=xlWhole).Row)

End If

ComboBox30.BackColor = &HFFFFFF

ComboBox30.Value = ""

ListBox5.BoundColumn = 11

ListBox5.ColumnCount = 11

ListBox5.BackColor = &HFFFFFF

ListBox5.ColumnWidths = "50;80;60;80;100;40;60;60;60;80;40"

With ZZFFF2

ListBox5.RowSource = .Range(.Cells(8, 1), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 11)).Address(External:=True)

End With

If ComboBox25.Value <> "" Then

ListBox5.ListIndex = AAAZ - 8

Else:

ListBox5.ListIndex = ListBox5.ListCount - 1

End If

Label128.Visible = False

ComboBox30.Visible = False

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox34_Change()

On Error GoTo EERR

Dim AAPP As Long

Dim AAAZ As Long

If TextBox1.Value = "ComboBox34" Then

AAAZ = CDbl(ZZFFF3.Range("c2:c1261").Cells.Find(What:=ComboBox34.Value, lookat:=xlWhole).Row)

AAPP = ComboBox34.ListIndex + 2

ComboBox33.Value = ZZFFF3.Cells(AAPP, 2).Value

If ComboBox34.Value <> "" Then

ListBox6.ListIndex = ComboBox34.ListIndex

Else:

ListBox6.ListIndex = ListBox6.ListCount - 1

End If

If ComboBox34.Value <> "" Then

Label191.Visible = True

ComboBox38.Visible = True

ComboBox38.Clear

With ComboBox38

.AddItem "Zugang"

.AddItem "Entnahme"

.AddItem "Artikelkonto"

.AddItem "Artikel/Lagerplätze"

.AddItem "Artikel/Lieferanten"

.AddItem "Artikel/Lieferant/Lagerplätze"

End With

Else:

End If

End If

Exit Sub

EERR:

ComboBox34.Value = ""

End Sub

 

Private Sub ComboBox34_Enter()

On Error GoTo EERR

TextBox1.Value = "ComboBox34"

ListBox6.BoundColumn = 7

ListBox6.ColumnCount = 7

ListBox6.BackColor = &HFFFFC0

With ZZFFF3

ListBox6.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 8)).Address(External:=True)

End With

If ComboBox34.Value <> "" Then

ListBox6.ListIndex = ComboBox34.ListIndex

Else:

ListBox6.ListIndex = ListBox6.ListCount - 1

End If

Label191.Visible = True

ComboBox38.Visible = True

ComboBox38.BackColor = &HFFFFC0

ComboBox38.Clear

With ComboBox38

.AddItem "Zugang"

.AddItem "Entnahme"

.AddItem "Artikelkonto"

.AddItem "Artikel/Lagerplätze"

.AddItem "Artikel/Lieferanten"

.AddItem "Artikel/Lieferant/Lagerplätze"

End With

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox44_Change()

On Error GoTo EERR

Dim AAPP As Long

Dim AAAZ As Long

If TextBox1.Value = "ComboBox44" Then

AAAZ = CDbl(ZZFFF3.Range("c2:c1261").Cells.Find(What:=ComboBox44.Value, lookat:=xlWhole).Row)

AAPP = ComboBox44.ListIndex + 2

ComboBox43.Value = ZZFFF3.Cells(AAPP, 2).Value

If ComboBox44.Value <> "" Then

ListBox7.ListIndex = ComboBox44.ListIndex

Else:

ListBox7.ListIndex = ListBox7.ListCount - 1

End If

If ComboBox44.Value <> "" Then

Label254.Visible = True

ComboBox47.Visible = True

ComboBox47.Clear

With ComboBox47

.AddItem "Zugang/Bestand"

.AddItem "Zugang/Wert"

.AddItem "Artikelkonto"

.AddItem "Artikel/Lagerplätze"

.AddItem "Artikel/Lieferanten"

.AddItem "Artikel/Lieferant/Lagerplätze"

End With

Else:

End If

End If

Exit Sub

EERR:

ComboBox44.Value = ""

End Sub

 

Private Sub ComboBox44_Enter()

On Error GoTo EERR

TextBox1.Value = "ComboBox44"

ListBox7.BoundColumn = 7

ListBox7.ColumnCount = 7

ListBox7.BackColor = &HFFFFC0

With ZZFFF3

ListBox7.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 8)).Address(External:=True)

End With

If ComboBox44.Value <> "" Then

ListBox7.ListIndex = ComboBox44.ListIndex

Else:

ListBox7.ListIndex = ListBox7.ListCount - 1

End If

Label254.Visible = True

ComboBox47.Visible = True

ComboBox47.BackColor = &HFFFFC0

ComboBox47.Clear

With ComboBox47

.AddItem "Zugang/Bestand"

.AddItem "Zugang/Wert"

.AddItem "Artikelkonto"

.AddItem "Artikel/Lagerplätze"

.AddItem "Artikel/Lieferanten"

.AddItem "Artikel/Lieferant/Lagerplätze"

End With

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox28_Change()

On Error GoTo EERR

Dim AAPP As Long

Dim AAAZ As Long

If TextBox1.Value = "ComboBox28" Then

If ComboBox28.Value <> "" Then

AAPP = CDbl(ZZFFF3.Range("c2:c1261").Cells.Find(What:=ComboBox28.Value, lookat:=xlWhole).Row)

ComboBox27.ListIndex = ComboBox28.ListIndex

If ComboBox27.Value <> "" Then

AAPP = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox27.Value, lookat:=xlWhole).Row)

End If

Else:

ComboBox27.Value = ""

End If

If ComboBox28.Value <> "" Then

ListBox5.ListIndex = AAPP - 2

Else:

ListBox5.ListIndex = ListBox5.ListCount - 1

End If

If ComboBox28.Value <> "" Then

Label128.Visible = True

ComboBox30.Visible = True

ComboBox30.Clear

With ComboBox30

.AddItem "Zugang"

.AddItem "Entnahme"

.AddItem "Artikelkonto"

.AddItem "Artikel/Lagerplätze"

.AddItem "Artikel/Lieferanten"

.AddItem "Artikel/Lieferant/Lagerplätze"

End With

End If

End If

Exit Sub

EERR:

ComboBox28.Value = ""

End Sub

 

Private Sub ComboBox28_Enter()

On Error GoTo EERR

Dim AAAZ As Long

TextBox1.Value = "ComboBox28"

ListBox5.BoundColumn = 7

ListBox5.ColumnCount = 7

ListBox5.BackColor = &HFFFFC0

If ComboBox28.Value <> "" Then

AAAZ = CDbl(ZZFFF3.Range("c2:c1261").Cells.Find(What:=ComboBox28.Value, lookat:=xlWhole).Row)

End If

With ZZFFF3

ListBox5.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 8)).Address(External:=True)

End With

If ComboBox28.Value <> "" Then

ListBox5.ListIndex = AAAZ - 2

Else:

ListBox5.ListIndex = ListBox5.ListCount - 1

End If

Label128.Visible = True

ComboBox30.Visible = True

ComboBox30.BackColor = &HFFFFC0

ComboBox30.Clear

With ComboBox30

.AddItem "Zugang"

.AddItem "Entnahme"

.AddItem "Artikelkonto"

.AddItem "Artikel/Lagerplätze"

.AddItem "Artikel/Lieferanten"

.AddItem "Artikel/Lieferant/Lagerplätze"

End With

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox19_Change()

On Error GoTo EERR

Dim AAPP As Long

Dim AAAZ As Long

If TextBox1.Value = "ComboBox19" Then

AAAZ = CDbl(ZZFFF3.Range("c2:c1261").Cells.Find(What:=ComboBox19.Value, lookat:=xlWhole).Row)

AAPP = ComboBox19.ListIndex + 2

ComboBox18.Value = ZZFFF3.Cells(AAPP, 2).Value

If ComboBox19.Value <> "" Then

ListBox4.ListIndex = ComboBox19.ListIndex

Else:

ListBox4.ListIndex = ListBox4.ListCount - 1

End If

If ComboBox19.Value <> "" Then

Label66.Visible = True

ComboBox23.Visible = True

ComboBox23.Clear

With ComboBox23

.AddItem "Zugang"

.AddItem "Entnahme"

.AddItem "Artikelkonto"

.AddItem "Artikel/Lagerplätze"

.AddItem "Artikel/Lieferanten"

.AddItem "Artikel/Lieferant/Lagerplätze"

End With

End If

End If

Exit Sub

EERR:

ComboBox19.Value = ""

End Sub

 

Private Sub ComboBox19_Enter()

On Error GoTo EERR

TextBox1.Value = "ComboBox19"

ListBox4.ColumnWidths = ""

ListBox4.BoundColumn = 7

ListBox4.ColumnCount = 7

ListBox4.BackColor = &HFFFFC0

With ZZFFF3

ListBox4.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 8)).Address(External:=True)

End With

If ComboBox19.Value <> "" Then

ListBox4.ListIndex = ComboBox19.ListIndex

Else:

ListBox4.ListIndex = ListBox4.ListCount - 1

End If

Label66.Visible = True

ComboBox23.Visible = True

ComboBox23.BackColor = &HFFFFC0

ComboBox23.Clear

With ComboBox23

.AddItem "Zugang"

.AddItem "Entnahme"

.AddItem "Artikelkonto"

.AddItem "Artikel/Lagerplätze"

.AddItem "Artikel/Lieferanten"

.AddItem "Artikel/Lieferant/Lagerplätze"

End With

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton16_Click()

On Error GoTo EERR

If ComboBox1.Value = "" Then

MsgBox "Artikelnummer ist nicht eingetragen!", 48, "http://excel.hpage.de   "

ComboBox1.SetFocus

Exit Sub

End If

Dim DDAATT As String

Dim AAAC As Long

DDAATT = Application.GetOpenFilename(, , "Bild auswählen             http://excel.hpage.de", , False)

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

Case Else

MsgBox "Sie haben kein gültiges Bild ausgewählt!", 48, "http://excel.hpage.de    "

End Select

Image1.Picture = LoadPicture(DDAATT)

If ComboBox1.Value <> "" Then

AAAC = CDbl(ZZFFF3.Range("b1:b1261").Cells.Find(What:=ComboBox1.Value, lookat:=xlWhole).Row)

AAAC = ComboBox1.ListIndex + 2

ZZFFF3.Cells(AAAC, 10) = DDAATT

End If

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton17_Click()

On Error GoTo EERR

If ComboBox1.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox1.SetFocus

Exit Sub

End If

Unload Me

Dim DDNN As Variant

Dim AAPP As Long

Dim AAAZ As Long

DDNN = Application.InputBox("Kennwort:", "http://excel.hpage.de       Bild entfernen")

If DDNN <> 3 Then

MsgBox "Das Kennwort ist falsch!", , "http://excel.hpage.de       Bild entfernen"

Exit Sub

Else

End If

If ComboBox1.Value <> "" Then

AAAZ = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox1.Value, lookat:=xlWhole).Row)

AAPP = ComboBox1.ListIndex + 2

ZZFFF3.Cells(AAPP, 10) = ""

End If

MsgBox "Der Artikel hat kein Bild mehr!", 48, "http://excel.hpage.de    "

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton8_Click()

On Error GoTo EERR

ZZFFF2.[n14] = "BSATZLO"

CommandButton12.Visible = False

UserForm2.Show

Exit Sub

EERR:

End Sub

 

Private Sub TextBox5_Change()

On Error GoTo EERR

Dim SCHOT As Long

Dim AAAR As Long

If TextBox5.Value <> "" Then

ZZFFF2.Range("a8:bx1048571").Value = ""

ZZFFF4.Range("b9:mag1048571").Value = ""

For SCHOT = 0 To 1259

AAAR = SCHOT * 7 + 2

If ZZFFF4.Cells(6, AAAR) <> "" Then

ZZFFF4.Cells(9, AAAR) = "_"

ZZFFF4.Cells(9, AAAR + 1) = Date

ZZFFF4.Cells(9, AAAR + 2) = "An.Best."

ZZFFF4.Cells(9, AAAR + 3) = ZZFFF4.Cells(4, AAAR + 3)

ZZFFF4.Cells(9, AAAR + 4) = ZZFFF4.Cells(5, AAAR + 4)

End If

Next SCHOT

ZZFFF6.Range("b5:xew1048571").Value = ""

For SCHOT = 0 To 2046

AAAR = SCHOT * 8 + 2

If ZZFFF6.Cells(2, AAAR + 5) <> "" Then

ZZFFF6.Cells(5, AAAR) = "_"

ZZFFF6.Cells(5, AAAR + 1) = Date

ZZFFF6.Cells(5, AAAR + 2) = "An.Best."

ZZFFF6.Cells(5, AAAR + 5) = ZZFFF6.Cells(2, AAAR + 5)

ZZFFF6.Cells(5, AAAR + 6) = ZZFFF6.Cells(3, AAAR + 6)

End If

Next SCHOT

ZZFFF9.Range("a2:tg1048571").Value = ""

ZZFFF1.Activate

MsgBox "Alles ist gelöscht!", 48, "http://excel.hpage.de    "

End If

Exit Sub

EERR:

End Sub

 

Private Sub CheckBox1_Click()

On Error GoTo EERR

CommandButton13.Visible = False

If CheckBox1 = True Then

CheckBox2 = False

CheckBox3 = False

CheckBox4 = False

CommandButton13.Visible = True

ComboBox1.Value = ""

ComboBox1.Locked = True

TextBox10.SetFocus

ComboBox1.TabStop = False

TextBox7.TabStop = False

TextBox8.TabStop = False

TextBox9.TabStop = False

ListBox1.BackColor = &HFFFFC0

With ZZFFF3

ListBox1.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 8)).Address(External:=True)

End With

If ComboBox1.Value <> "" Then

ListBox1.ListIndex = ComboBox1.ListIndex

Else:

ListBox1.ListIndex = ListBox1.ListCount - 1

End If

Else:

ComboBox1.Locked = False

ComboBox1.TabStop = True

TextBox7.TabStop = True

TextBox8.TabStop = True

TextBox9.TabStop = True

End If

Exit Sub

EERR:

End Sub

 

Private Sub CheckBox2_Click()

On Error GoTo EERR

CommandButton13.Visible = False

If CheckBox2 = True Then

CheckBox1 = False

CheckBox3 = False

CheckBox4 = False

CommandButton13.Visible = True

ComboBox1.Value = ""

ComboBox1.SetFocus

ListBox1.BackColor = &HFFFFC0

With ZZFFF3

ListBox1.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 8)).Address(External:=True)

End With

If ComboBox1.Value <> "" Then

ListBox1.ListIndex = ComboBox1.ListIndex

Else:

ListBox1.ListIndex = ListBox1.ListCount - 1

End If

Else:

End If

Exit Sub

EERR:

End Sub

 

Private Sub CheckBox3_Click()

On Error GoTo EERR

CommandButton15.Visible = False

If CheckBox3 = True Then

CheckBox1 = False

CheckBox2 = False

CheckBox4 = False

CommandButton15.Visible = True

ComboBox2.Value = ""

ComboBox2.Locked = True

TextBox15.SetFocus

ComboBox2.TabStop = False

ListBox1.BackColor = &HC0FFC0

With ZZFFF5

ListBox1.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 4)).Address(External:=True)

End With

If ComboBox2.Value <> "" Then

ListBox1.ListIndex = ComboBox2.ListIndex

Else:

ListBox1.ListIndex = ListBox1.ListCount - 1

End If

Else:

ComboBox2.Locked = False

ComboBox2.TabStop = True

End If

Exit Sub

EERR:

End Sub

 

Private Sub CheckBox4_Click()

On Error GoTo EERR

CommandButton15.Visible = False

If CheckBox4 = True Then

CheckBox1 = False

CheckBox2 = False

CheckBox3 = False

CommandButton15.Visible = True

ComboBox2.Value = ""

ComboBox2.SetFocus

ListBox1.BackColor = &HC0FFC0

With ZZFFF5

ListBox1.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 4)).Address(External:=True)

End With

If ComboBox2.Value <> "" Then

ListBox1.ListIndex = ComboBox2.ListIndex

Else:

ListBox1.ListIndex = ListBox1.ListCount - 1

End If

Else:

End If

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton1_Click()

On Error GoTo EERR

With Frame1

.Height = 426

.Left = 0

.Top = 0

.Width = 750

.Visible = True

End With

With UserForm1

.Height = 455

.Width = 757

End With

With ZZFFF3

ComboBox1.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 2)).Address(External:=True)

End With

With ZZFFF5

ComboBox2.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 2)).Address(External:=True)

End With

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton6_Click()

On Error GoTo EERR

With Frame6

.Height = 426

.Left = 0

.Top = 0

.Width = 750

.Visible = True

End With

With UserForm1

.Height = 455

.Width = 757

End With

TextBox48.Value = Date

With ZZFFF3

ComboBox33.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 2)).Address(External:=True)

ComboBox34.RowSource = .Range(.Cells(2, 3), .Cells(1263, 3)).Address(External:=True)

End With

With ZZFFF5

ComboBox37.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 2)).Address(External:=True)

End With

With ZZFFF2

ComboBox32.RowSource = .Range(.Cells(8, 42), .Cells(.Cells(Rows.Count, 42).End(xlUp).Row, 42)).Address(External:=True)

End With

ComboBox33.Value = ""

ComboBox35.Value = ""

ComboBox36.Value = ""

ComboBox37.Value = ""

ComboBox32.Value = ""

ComboBox32.SetFocus

TextBox47.Value = ""

TextBox49.Value = ""

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton2_Click()

On Error GoTo EERR

With Frame2

.Height = 426

.Left = 0

.Top = 0

.Width = 750

.Visible = True

End With

With UserForm1

.Height = 455

.Width = 757

End With

With ZZFFF7

ComboBox7.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 2)).Address(External:=True)

ComboBox5.RowSource = .Range(.Cells(2, 3), .Cells(.Cells(Rows.Count, 3).End(xlUp).Row, 3)).Address(External:=True)

ComboBox6.RowSource = .Range(.Cells(2, 6), .Cells(.Cells(Rows.Count, 6).End(xlUp).Row, 6)).Address(External:=True)

End With

ComboBox8.Clear

With ComboBox8

.AddItem "Frau"

.AddItem "Herr"

End With

ListBox2.BoundColumn = 13

ListBox2.ColumnCount = 13

ListBox2.BackColor = &HFFFF&

With ZZFFF7

ListBox2.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 15)).Address(External:=True)

End With

If ComboBox7.Value <> "" Then

ListBox2.ListIndex = ComboBox7.ListIndex

Else:

ListBox2.ListIndex = ListBox2.ListCount - 1

End If

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton7_Click()

On Error GoTo EERR

Dim AAAZ As Long

With Frame7

.Height = 426

.Left = 0

.Top = 0

.Width = 750

.Visible = True

End With

With UserForm1

.Height = 455

.Width = 757

End With

TextBox52.Value = Date

TextBox52.SetFocus

With ZZFFF3

ComboBox43.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 2)).Address(External:=True)

ComboBox44.RowSource = .Range(.Cells(2, 3), .Cells(1263, 3)).Address(External:=True)

End With

With ZZFFF8

ComboBox42.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 2)).Address(External:=True)

End With

With ZZFFF9

ComboBox40.RowSource = .Range(.Cells(2, 1), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 1)).Address(External:=True)

End With

ComboBox40.Value = ""

ComboBox41.Value = ""

ComboBox42.Value = ""

ComboBox43.Value = ""

ComboBox45.Value = ""

ComboBox46.Value = ""

Label282.Caption = ""

Label284.Caption = ""

TextBox53.Value = ""

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton3_Click()

On Error GoTo EERR

With Frame3

.Height = 426

.Left = 0

.Top = 0

.Width = 750

.Visible = True

End With

With UserForm1

.Height = 455

.Width = 757

End With

With ZZFFF8

ComboBox13.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 2)).Address(External:=True)

ComboBox11.RowSource = .Range(.Cells(2, 3), .Cells(.Cells(Rows.Count, 3).End(xlUp).Row, 3)).Address(External:=True)

ComboBox12.RowSource = .Range(.Cells(2, 6), .Cells(.Cells(Rows.Count, 6).End(xlUp).Row, 6)).Address(External:=True)

End With

ComboBox14.Clear

With ComboBox14

.AddItem "Frau"

.AddItem "Herr"

End With

ListBox3.BoundColumn = 13

ListBox3.ColumnCount = 13

ListBox3.BackColor = &HC0E0FF

With ZZFFF8

ListBox3.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 15)).Address(External:=True)

End With

If ComboBox13.Value <> "" Then

ListBox3.ListIndex = ComboBox13.ListIndex

Else:

ListBox3.ListIndex = ListBox3.ListCount - 1

End If

ComboBox15.Clear

With ComboBox15

.AddItem "Kunde/Artikeln"

.AddItem "Kunde/Lieferanten"

End With

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton4_Click()

On Error GoTo EERR

With Frame4

.Height = 426

.Left = 0

.Top = 0

.Width = 750

.Visible = True

End With

With UserForm1

.Height = 455

.Width = 757

End With

TextBox39.Value = Date

With ZZFFF7

ComboBox17.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 2)).Address(External:=True)

End With

With ZZFFF3

ComboBox18.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 2)).Address(External:=True)

ComboBox19.RowSource = .Range(.Cells(2, 3), .Cells(1263, 3)).Address(External:=True)

End With

With ZZFFF5

ComboBox22.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 2)).Address(External:=True)

End With

With ZZFFF2

ComboBox16.RowSource = .Range(.Cells(8, 15), .Cells(.Cells(Rows.Count, 15).End(xlUp).Row, 15)).Address(External:=True)

End With

Call crrrch

ComboBox17.Value = ""

ComboBox18.Value = ""

ComboBox20.Value = "W"

ComboBox21.Value = "W"

ComboBox22.Value = ""

ComboBox16.Value = ""

ComboBox16.SetFocus

TextBox38.Value = ""

TextBox40.Value = ""

TextBox41.Value = ""

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton5_Click()

On Error GoTo EERR

With Frame5

.Height = 426

.Left = 0

.Top = 0

.Width = 750

.Visible = True

End With

With UserForm1

.Height = 455

.Width = 757

End With

TextBox44.Value = Date

With ZZFFF7

ComboBox26.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 2)).Address(External:=True)

End With

With ZZFFF2

ComboBox25.RowSource = .Range(.Cells(8, 29), .Cells(.Cells(Rows.Count, 29).End(xlUp).Row, 29)).Address(External:=True)

End With

ComboBox26.Value = ""

ComboBox27.Value = ""

ComboBox29.Value = ""

ComboBox25.Value = ""

ComboBox25.SetFocus

TextBox43.Value = ""

TextBox45.Value = ""

Exit Sub

EERR:

End Sub

 

Sub crrrch()

On Error GoTo EERR

If ZZFFF1.Cells(1961, 1962) <> Date Then

ZZFFF1.Cells(1961, 1962) = Date

ActiveWorkbook.FollowHyperlink Address:="https://www.youtube.com/watch?v=Bly5-Gc1MyM&list=PLcwMjDfa1J1_GY9C7z1eCs2eMpf9LE9ig", NewWindow:=True

End If

Exit Sub

EERR:

End Sub

 

 

Private Sub TextBox48_Enter()

On Error GoTo EERR

Dim AAAZ As Long

If ComboBox32.Value <> "" Then

AAAZ = CDbl(ZZFFF2.Range("a7:b1048571").Cells.Find(What:=ComboBox32.Value, lookat:=xlWhole).Row)

End If

ComboBox38.BackColor = &HFFFFFF

ComboBox38.Value = ""

ListBox6.BoundColumn = 11

ListBox6.ColumnCount = 11

ListBox6.BackColor = &HFFFFFF

ListBox6.ColumnWidths = "50;80;60;80;100;40;60;60;60;80;40"

With ZZFFF2

ListBox6.RowSource = .Range(.Cells(8, 1), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 11)).Address(External:=True)

End With

If ComboBox32.Value <> "" Then

ListBox6.ListIndex = AAAZ - 8

Else:

ListBox6.ListIndex = ListBox6.ListCount - 1

End If

Label191.Visible = False

ComboBox38.Visible = False

Exit Sub

EERR:

End Sub

 

Private Sub TextBox48_Exit(ByVal Cancel As MSForms.ReturnBoolean)

On Error GoTo EERR

If TextBox48.Value <> "" Then

TextBox48.Value = CDate(TextBox48.Value)

Else:

TextBox48.Value = Date

End If

Exit Sub

EERR:

TextBox48.Value = Date

End Sub

 

Private Sub TextBox52_Enter()

On Error GoTo EERR

Dim AAAZ As Long

Dim SPOS As Long

Dim POSP As Long

POSP = 0

TextBox1.Value = "TextBox52"

If ComboBox40.Value <> "" Then

AAAZ = CDbl(ZZFFF9.Range("a2:a1048571").Cells.Find(What:=ComboBox40.Value, lookat:=xlWhole).Row)

If ComboBox41.Value <> "" Then

SPOS = ComboBox41.Value

POSP = ZZFFF9.Cells(AAAZ, SPOS + 487).Value

End If

End If

ComboBox47.BackColor = &HFFFFFF

ComboBox47.Value = ""

ListBox7.BoundColumn = 11

ListBox7.ColumnCount = 11

ListBox7.BackColor = &HFFFFFF

ListBox7.ColumnWidths = "50;80;60;80;100;40;60;60;60;80;40"

With ZZFFF2

ListBox7.RowSource = .Range(.Cells(8, 1), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 11)).Address(External:=True)

End With

If POSP > 0 Then

ListBox7.ListIndex = POSP - 8

Else:

ListBox7.ListIndex = ListBox7.ListCount - 1

End If

Label254.Visible = False

ComboBox47.Visible = False

Exit Sub

EERR:

End Sub

 

Private Sub TextBox52_Exit(ByVal Cancel As MSForms.ReturnBoolean)

On Error GoTo EERR

If TextBox52.Value <> "" Then

TextBox52.Value = CDate(TextBox52.Value)

Else:

TextBox52.Value = Date

End If

Exit Sub

EERR:

TextBox52.Value = Date

End Sub

 

Private Sub TextBox44_Enter()

On Error GoTo EERR

Dim AAAZ As Long

If ComboBox25.Value <> "" Then

AAAZ = CDbl(ZZFFF2.Range("a7:b1048571").Cells.Find(What:=ComboBox25.Value, lookat:=xlWhole).Row)

End If

ComboBox30.BackColor = &HFFFFFF

ComboBox30.Value = ""

ListBox5.BoundColumn = 11

ListBox5.ColumnCount = 11

ListBox5.BackColor = &HFFFFFF

ListBox5.ColumnWidths = "50;80;60;80;100;40;60;60;60;80;40"

With ZZFFF2

ListBox5.RowSource = .Range(.Cells(8, 1), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 11)).Address(External:=True)

End With

If ComboBox25.Value <> "" Then

ListBox5.ListIndex = AAAZ - 8

Else:

ListBox5.ListIndex = ListBox5.ListCount - 1

End If

Label128.Visible = False

ComboBox30.Visible = False

Exit Sub

EERR:

End Sub

 

Private Sub TextBox44_Exit(ByVal Cancel As MSForms.ReturnBoolean)

On Error GoTo EERR

If TextBox44.Value <> "" Then

TextBox44.Value = CDate(TextBox44.Value)

Else:

TextBox44.Value = Date

End If

Call ZLIPA2

Exit Sub

EERR:

TextBox44.Value = Date

End Sub

 

Private Sub TextBox39_Enter()

On Error GoTo EERR

Dim AAAZ As Long

If ComboBox16.Value <> "" Then

AAAZ = CDbl(ZZFFF2.Range("a7:b1048571").Cells.Find(What:=ComboBox16.Value, lookat:=xlWhole).Row)

End If

ComboBox23.BackColor = &HFFFFFF

ComboBox23.Value = ""

ListBox4.BoundColumn = 11

ListBox4.ColumnCount = 11

ListBox4.BackColor = &HFFFFFF

ListBox4.ColumnWidths = "50;80;60;80;100;40;60;60;60;80;40"

With ZZFFF2

ListBox4.RowSource = .Range(.Cells(8, 1), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 11)).Address(External:=True)

End With

If ComboBox16.Value <> "" Then

ListBox4.ListIndex = AAAZ - 8

Else:

ListBox4.ListIndex = ListBox4.ListCount - 1

End If

Label66.Visible = False

ComboBox23.Visible = False

Exit Sub

EERR:

End Sub

 

Private Sub TextBox39_Exit(ByVal Cancel As MSForms.ReturnBoolean)

On Error GoTo EERR

If TextBox39.Value <> "" Then

TextBox39.Value = CDate(TextBox39)

Else:

TextBox39.Value = Date

End If

Call ZLIPA2

Exit Sub

EERR:

TextBox39.Value = Date

End Sub

 

Private Sub CommandButton13_Click()

On Error GoTo EERR

Dim ††† As Long

TextBox2.Value = "EintragenAr"

TextBox10.SetFocus

TextBox13.SetFocus

If CheckBox2 = True Then

If ComboBox1.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de   "

ComboBox1.SetFocus

Exit Sub

End If

If TextBox10.Value = "" Then

MsgBox "Neue Artikelnummer ist nicht eingetragen!", 48, "http://excel.hpage.de   "

TextBox10.SetFocus

Exit Sub

End If

††† = ComboBox1.ListIndex + 2

End If

If CheckBox1 = True Then

If TextBox10.Value = "" Then

MsgBox "Neue Artikelnummer ist nicht eingetragen!", 48, "http://excel.hpage.de   "

TextBox10.SetFocus

Exit Sub

End If

Call ZLIPA1

††† = CLng(TextBox2.Value)

If ††† > 1261 Then

MsgBox "Es sind schon 1260 Artikelkonten erstellt worden!", 48, "http://excel.hpage.de"

Exit Sub

End If

End If

ZZFFF3.Cells(†††, 2) = TextBox10.Value

ZZFFF3.Cells(†††, 3) = TextBox11.Value

ZZFFF3.Cells(†††, 4) = TextBox12.Value

If TextBox13.Value <> "" Then

ZZFFF3.Cells(†††, 5) = CDbl(TextBox13.Value)

Else:

ZZFFF3.Cells(†††, 5) = TextBox13.Value

End If

If TextBox10.Value = "" Then

End If

If CheckBox2 = True Then

ComboBox1.SetFocus

End If

If CheckBox1 = True Then

TextBox10.SetFocus

End If

With ZZFFF3

ComboBox1.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 2)).Address(External:=True)

End With

ComboBox1.Value = ""

ComboBox1.Value = TextBox10.Value

TextBox10.Value = ""

TextBox11.Value = ""

TextBox12.Value = ""

TextBox13.Value = ""

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton15_Click()

On Error GoTo EERR

TextBox2.Value = "EintragenLp"

Dim ††† As Long

If CheckBox4 = True Then

If ComboBox2.Value = "" Then

MsgBox "Lagerplatz ist nicht ausgewählt!", 48, "http://excel.hpage.de   "

ComboBox2.SetFocus

Exit Sub

End If

If TextBox15.Value = "" Then

MsgBox "Neuer Lagerplatz ist nicht eingetragen!", 48, "http://excel.hpage.de   "

TextBox15.SetFocus

Exit Sub

End If

††† = ComboBox2.ListIndex + 2

End If

If CheckBox3 = True Then

If TextBox15.Value = "" Then

MsgBox "Neuer Lagerplatz ist nicht eingetragen!", 48, "http://excel.hpage.de   "

TextBox15.SetFocus

Exit Sub

End If

Call ZLIPA1

††† = CLng(TextBox2.Value)

If ††† > 2048 Then

MsgBox "Es sind schon 2047 Lagerplazkonten erstellt worden!", 48, "http://excel.hpage.de"

Exit Sub

End If

End If

ZZFFF5.Cells(†††, 2) = TextBox15.Value

If CheckBox4 = True Then

ComboBox2.SetFocus

End If

If CheckBox3 = True Then

TextBox15.SetFocus

End If

With ZZFFF5

ComboBox2.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 2)).Address(External:=True)

End With

ComboBox2.Value = ""

ComboBox2.Value = TextBox15.Value

TextBox15.Value = ""

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton37_Click()

On Error GoTo EERR

Dim MESA As String

Dim MESL As String

Dim MESP As String

Dim ††† As Long

Dim AAPP2 As Long

Dim AAPP3 As Long

Dim AAPP4 As Long

Dim AAPP5 As Long

Dim AAPP6 As Long

Dim AAPP7 As Long

Dim AAPP8 As Long

Dim AAPP9 As Long

Dim AAAZ As Long

Dim AAAZ2 As Long

Dim AAAZ3 As Long

Dim AAAC As Long

Dim AAAC2 As Long

TextBox48.SetFocus

TextBox49.SetFocus

TextBox47.SetFocus

TextBox1.Value = "CommandButton37"

If ComboBox32.Value <> "" Then

ComboBox32.Value = ""

End If

If ComboBox33.Value = "" Then

MsgBox "Artikeln ist nicht eingetragen!", 48, "http://excel.hpage.de"

ComboBox33.SetFocus

Exit Sub

End If

If ComboBox35.Value = "" Then

MsgBox "Lieferant ist nicht eingetragen!", 48, "http://excel.hpage.de"

ComboBox35.SetFocus

Exit Sub

End If

If ComboBox36.Value = "" Then

MsgBox "Vom Lagerplatz ist nicht eingetragen!", 48, "http://excel.hpage.de"

ComboBox36.SetFocus

Exit Sub

End If

If ComboBox37.Value = "" Then

MsgBox "An Lagerplatz ist nicht eingetragen!", 48, "http://excel.hpage.de"

ComboBox37.SetFocus

Exit Sub

End If

If ComboBox37.Value = ComboBox36.Value Then

MsgBox "An Lagerplatz ist gleich wie Vom Lagerplatz!", 48, "http://excel.hpage.de"

ComboBox37.SetFocus

Exit Sub

End If

If TextBox49.Value = "" Then

MsgBox "Menge ist nicht eingetragen!", 48, "http://excel.hpage.de"

TextBox49.SetFocus

Exit Sub

End If

If Label212.Caption = "" Then

MsgBox "Auf Vom Lagerplatz gibt es kein Artikel von dem ausgewählten Lieferant!", 48, "http://excel.hpage.de"

TextBox49.SetFocus

Exit Sub

End If

If CDbl(TextBox49.Value) > CDbl(Label212.Caption) Then

MsgBox "Auf Vom Lagerplatz gibt es nicht so viel Artikel von dem ausgewählten Lieferant wie es eingetragen ist!", 48, "http://excel.hpage.de"

TextBox49.SetFocus

Exit Sub

End If

If TextBox50.Value = "" Then

MsgBox "Menge ist nicht eingetragen!", 48, "http://excel.hpage.de"

TextBox49.Value = ""

TextBox49.SetFocus

Exit Sub

End If

If CDbl(TextBox49.Value) < 0 Then

TextBox49.Value = CDbl(TextBox49.Value) * -1

End If

AAPP2 = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox35.Value, lookat:=xlWhole).Row)

AAPP3 = ComboBox33.ListIndex + 2

AAPP4 = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox36.Value, lookat:=xlWhole).Row)

AAPP6 = ComboBox33.ListIndex * 7 + 2

AAPP7 = (AAPP4 - 2) * 8 + 2

AAPP8 = ComboBox37.ListIndex + 2

AAPP9 = ComboBox37.ListIndex * 8 + 2

If ComboBox32.Value = "" Then

Call ZLIPA1

††† = CLng(TextBox2.Value)

TextBox1.Value = "BStobezID"

Call ZLIPA1

AAPP5 = CLng(TextBox2.Value)

If ††† > 100007 Then

MsgBox "Es sind schon 100000 Buchungssätze eingetragen worden!", 48, "http://excel.hpage.de"

Exit Sub

End If

Label114.Caption = TextBox50.Value

ZZFFF2.Cells(†††, 1).Value = ††† - 7

ZZFFF2.Cells(†††, 2).Value = TextBox47.Value

ZZFFF2.Cells(†††, 3).Value = CDate(TextBox48.Value)

AAAZ2 = CDbl(Month(TextBox48.Value))

ZZFFF2.Cells(†††, 4).Value = ZZFFF3.Cells(AAPP3, 2)

ZZFFF2.Cells(†††, 5).Value = ZZFFF3.Cells(AAPP3, 3)

ZZFFF2.Cells(†††, 6).Value = ZZFFF3.Cells(AAPP3, 4)

ZZFFF2.Cells(†††, 7).Value = CDbl(TextBox49.Value)

ZZFFF2.Cells(†††, 8).Value = CDbl(Label114.Caption)

ZZFFF2.Cells(†††, 9).Value = ZZFFF7.Cells(AAPP2, 2)

ZZFFF2.Cells(†††, 10).Value = ZZFFF5.Cells(AAPP4, 2) & "_" & ZZFFF5.Cells(AAPP8, 2)

ZZFFF2.Cells(AAPP5, 42).Value = ††† - 7

ZZFFF2.Cells(AAPP5, 43).Value = †††

ZZFFF2.Cells(AAPP5, 47).Value = AAAZ2

ZZFFF2.Cells(AAPP5, 44).Value = AAPP3

ZZFFF2.Cells(AAPP5, 45).Value = AAPP2

ZZFFF2.Cells(AAPP5, 46).Value = AAPP4

ZZFFF2.Cells(AAPP5, 48).Value = AAPP6

ZZFFF2.Cells(AAPP5, 50).Value = AAPP7

ZZFFF2.Cells(AAPP5, 55).Value = AAPP8

ZZFFF2.Cells(AAPP5, 56).Value = AAPP9

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2) = ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2) - CDbl(TextBox49.Value)

If ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2) = ""

End If

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) = ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) - CDbl(Label114.Caption)

If ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) = ""

End If

If ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2) = "" Or ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) = "" Then

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2) = ""

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) = ""

End If

ZZFFF7.Cells(AAPP2, 2567 + (AAPP8 - 2) * 2) = ZZFFF7.Cells(AAPP2, 2567 + (AAPP8 - 2) * 2) + CDbl(TextBox49.Value)

ZZFFF7.Cells(AAPP2, 2567 + (AAPP8 - 2) * 2 + 1) = ZZFFF7.Cells(AAPP2, 2567 + (AAPP8 - 2) * 2 + 1) + CDbl(Label114.Caption)

TextBox1.Value = "ZeileArtikelkontoIDLeer"

TextBox4.Value = ZZFFF2.Cells(AAPP5, 48).Value

Call ZLIPA1

AAAZ3 = CLng(TextBox2.Value)

ZZFFF2.Cells(AAPP5, 49).Value = CLng(TextBox2.Value)

ZZFFF4.Cells(AAAZ3, AAPP6) = ZZFFF2.Cells(†††, 1)

ZZFFF4.Cells(AAAZ3, AAPP6 + 1) = CDate(TextBox48.Value)

ZZFFF4.Cells(AAAZ3, AAPP6 + 2) = TextBox47.Value

ZZFFF4.Cells(AAAZ3, AAPP6 + 5) = ZZFFF7.Cells(AAPP2, 2)

ZZFFF4.Cells(AAAZ3, AAPP6 + 6) = CDbl(TextBox49.Value) & "_" & CDbl(Label114.Caption) & "_" & ZZFFF5.Cells(AAPP4, 2) & "_" & ZZFFF5.Cells(AAPP8, 2)

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) = ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) - CDbl(TextBox49.Value)

If ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) <= 0.001 Then

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) = ""

End If

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) = ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) - CDbl(Label114.Caption)

If ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) <= 0.001 Then

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) = ""

End If

If ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) = "" Or ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) = "" Then

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) = ""

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) = ""

End If

ZZFFF3.Cells(AAPP3, 44 + (AAPP8 - 2) * 2) = ZZFFF3.Cells(AAPP3, 44 + (AAPP8 - 2) * 2) + CDbl(TextBox49.Value)

ZZFFF3.Cells(AAPP3, 44 + (AAPP8 - 2) * 2 + 1) = ZZFFF3.Cells(AAPP3, 44 + (AAPP8 - 2) * 2 + 1) + CDbl(Label114.Caption)

TextBox1.Value = "ZeileLagerkontoIDLeer"

TextBox4.Value = AAPP7

Call ZLIPA1

AAAZ3 = CLng(TextBox2.Value)

ZZFFF2.Cells(AAPP5, 57).Value = CLng(TextBox2.Value)

ZZFFF6.Cells(AAAZ3, AAPP7) = ZZFFF2.Cells(†††, 1)

ZZFFF6.Cells(AAAZ3, AAPP7 + 1) = CDate(TextBox48.Value)

ZZFFF6.Cells(AAAZ3, AAPP7 + 2) = TextBox47.Value

ZZFFF6.Cells(AAAZ3, AAPP7 + 3) = ZZFFF3.Cells(AAPP3, 2)

ZZFFF6.Cells(AAAZ3, AAPP7 + 4) = ZZFFF3.Cells(AAPP3, 3) & "_" & ZZFFF3.Cells(AAPP3, 4)

ZZFFF6.Cells(AAAZ3, AAPP7 + 5) = CDbl(TextBox49.Value) * -1

ZZFFF6.Cells(AAAZ3, AAPP7 + 6) = CDbl(Label114.Caption) * -1

ZZFFF6.Cells(AAAZ3, AAPP7 + 7) = ZZFFF7.Cells(AAPP2, 2)

ZZFFF6.Cells(2, AAPP7 + 5).FormulaR1C1 = "=SUM(R[3]C:R[1048569]C)"

ZZFFF6.Cells(2, AAPP7 + 5) = ZZFFF6.Cells(2, AAPP7 + 5)

ZZFFF6.Cells(3, AAPP7 + 6).FormulaR1C1 = "=SUM(R[2]C:R[1048568]C)"

ZZFFF6.Cells(3, AAPP7 + 6) = ZZFFF6.Cells(3, AAPP7 + 6)

TextBox1.Value = "ZeileLagerkontoIDLeer"

TextBox4.Value = AAPP9

Call ZLIPA1

AAAZ3 = CLng(TextBox2.Value)

ZZFFF2.Cells(AAPP5, 58).Value = CLng(TextBox2.Value)

ZZFFF6.Cells(AAAZ3, AAPP9) = ZZFFF2.Cells(†††, 1)

ZZFFF6.Cells(AAAZ3, AAPP9 + 1) = CDate(TextBox48.Value)

ZZFFF6.Cells(AAAZ3, AAPP9 + 2) = TextBox47.Value

ZZFFF6.Cells(AAAZ3, AAPP9 + 3) = ZZFFF3.Cells(AAPP3, 2)

ZZFFF6.Cells(AAAZ3, AAPP9 + 4) = ZZFFF3.Cells(AAPP3, 3) & "_" & ZZFFF3.Cells(AAPP3, 4)

ZZFFF6.Cells(AAAZ3, AAPP9 + 5) = CDbl(TextBox49.Value)

ZZFFF6.Cells(AAAZ3, AAPP9 + 6) = CDbl(Label114.Caption)

ZZFFF6.Cells(AAAZ3, AAPP9 + 7) = ZZFFF7.Cells(AAPP2, 2)

ZZFFF6.Cells(2, AAPP9 + 5).FormulaR1C1 = "=SUM(R[3]C:R[1048569]C)"

ZZFFF6.Cells(2, AAPP9 + 5) = ZZFFF6.Cells(2, AAPP9 + 5)

ZZFFF6.Cells(3, AAPP9 + 6).FormulaR1C1 = "=SUM(R[2]C:R[1048568]C)"

ZZFFF6.Cells(3, AAPP9 + 6) = ZZFFF6.Cells(3, AAPP9 + 6)

ZZFFF5.Cells(AAPP4, 3) = ZZFFF6.Cells(2, AAPP7 + 5)

If ZZFFF5.Cells(AAPP4, 3) <= 0.001 Then

ZZFFF5.Cells(AAPP4, 3) = ""

End If

ZZFFF5.Cells(AAPP4, 4) = ZZFFF6.Cells(3, AAPP7 + 6)

If ZZFFF5.Cells(AAPP4, 4) <= 0.001 Then

ZZFFF5.Cells(AAPP4, 4) = ""

End If

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2) = ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2) - CDbl(TextBox49.Value)

If ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2) <= 0.001 Then

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2) = ""

End If

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) = ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) - CDbl(Label114.Caption)

If ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) <= 0.001 Then

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) = ""

End If

If ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2) = "" Or ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) = "" Then

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2) = ""

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) = ""

End If

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2) = ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2) - CDbl(TextBox49.Value)

If ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2) <= 0.001 Then

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2) = ""

End If

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) = ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) - CDbl(Label114.Caption)

If ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) <= 0.001 Then

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) = ""

End If

If ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2) = "" Or ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) = "" Then

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2) = ""

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) = ""

End If

ZZFFF5.Cells(AAPP8, 3) = ZZFFF6.Cells(2, AAPP9 + 5)

ZZFFF5.Cells(AAPP8, 4) = ZZFFF6.Cells(3, AAPP9 + 6)

ZZFFF5.Cells(AAPP8, 7 + (AAPP3 - 2) * 2) = ZZFFF5.Cells(AAPP8, 7 + (AAPP3 - 2) * 2) + CDbl(TextBox49.Value)

ZZFFF5.Cells(AAPP8, 7 + (AAPP3 - 2) * 2 + 1) = ZZFFF5.Cells(AAPP8, 7 + (AAPP3 - 2) * 2 + 1) + CDbl(Label114.Caption)

ZZFFF5.Cells(AAPP8, 2529 + (AAPP2 - 2) * 2) = ZZFFF5.Cells(AAPP8, 2529 + (AAPP2 - 2) * 2) + CDbl(TextBox49.Value)

ZZFFF5.Cells(AAPP8, 2529 + (AAPP2 - 2) * 2 + 1) = ZZFFF5.Cells(AAPP8, 2529 + (AAPP2 - 2) * 2 + 1) + CDbl(Label114.Caption)

AAPP3 = ComboBox33.ListIndex + 2

AAPP2 = AAPP2 - 2

AAPP4 = AAPP4 - 2

ZZFFF2.Cells(AAPP5, 25).Value = ComboBox33.ListIndex + 2

ZZFFF2.Cells(AAPP5, 26).Value = AAPP2

ZZFFF2.Cells(AAPP5, 27).Value = AAPP4

AAAZ = ZZFFF3.Cells(AAPP3, 16383) + AAPP2

AAAC = ZZFFF3.Cells(AAPP3, 16384)

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) - CDbl(TextBox49.Value)

If ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) <= 0.001 Then

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) = ""

End If

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) - CDbl(Label114.Caption)

If ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) <= 0.001 Then

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) = ""

End If

If ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) = "" Or ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) = "" Then

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) = ""

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) = ""

End If

AAPP3 = ComboBox33.ListIndex + 2

AAPP2 = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox35.Value, lookat:=xlWhole).Row) - 2

AAPP8 = AAPP8 - 2

ZZFFF2.Cells(AAPP5, 25).Value = ComboBox33.ListIndex + 2

ZZFFF2.Cells(AAPP5, 26).Value = AAPP2

ZZFFF2.Cells(AAPP5, 27).Value = AAPP8

AAAZ = ZZFFF3.Cells(AAPP3, 16383) + AAPP2

AAAC = ZZFFF3.Cells(AAPP3, 16384)

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP8)) = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP8)) + CDbl(TextBox49.Value)

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP8) + 1) = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP8) + 1) + CDbl(Label114.Caption)

Call ZLIPA2

With ZZFFF2

ComboBox32.RowSource = .Range(.Cells(8, 42), .Cells(.Cells(Rows.Count, 42).End(xlUp).Row, 42)).Address(External:=True)

End With

TextBox49.Value = ""

ComboBox32.Value = ††† - 7

ComboBox32.SetFocus

End If

MESA = ComboBox33.Value

MESL = ComboBox35.Value

MESP = ComboBox36.Value

ComboBox33.Value = ""

ComboBox35.Value = ""

ComboBox36.Value = ""

ComboBox33.Value = MESA

ComboBox35.Value = MESL

ComboBox36.Value = MESP

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton41_Click()

On Error GoTo EERR

Dim AAAC As Long

Dim NOMSC As String

Dim AAPP1 As Long

Dim AAPP2 As Long

Dim AAPP3 As Long

Dim AAPP4 As Long

Dim AAPP5 As Long

Dim AAPP6 As Long

Dim AAPP7 As Long

Dim AAPP8 As Long

Dim ††† As Long

Dim AAAZ1 As Long

Dim AAAZ3 As Long

Dim SPOS As Long

Dim ECHER As Variant

TextBox53.SetFocus

TextBox52.SetFocus

TextBox1.Value = "CommandButton41"

If ComboBox41.Value <> "" Then

ComboBox41.Value = ""

End If

If ComboBox42.Value = "" Then

MsgBox "Kunde ist nicht eingetragen!", 48, "http://excel.hpage.de"

ComboBox42.SetFocus

Exit Sub

End If

If ComboBox43.Value = "" Then

MsgBox "Artikeln ist nicht eingetragen!", 48, "http://excel.hpage.de"

ComboBox43.SetFocus

Exit Sub

End If

If ComboBox45.Value = "" Then

MsgBox "Lieferant ist nicht eingetragen!", 48, "http://excel.hpage.de"

ComboBox45.SetFocus

Exit Sub

End If

If ComboBox46.Value = "" Then

MsgBox "Lagerplatz ist nicht eingetragen!", 48, "http://excel.hpage.de"

ComboBox46.SetFocus

Exit Sub

End If

If TextBox53.Value = "" Then

MsgBox "Menge ist nicht eingetragen!", 48, "http://excel.hpage.de"

TextBox53.SetFocus

Exit Sub

End If

If Label283.Caption = "" Then

MsgBox "Auf dem ausgewählten Lagerplatz gibt es keine Artikel von dem ausgewählten Lieferant!", 48, "http://excel.hpage.de"

TextBox53.SetFocus

Exit Sub

End If

If CDbl(TextBox53.Value) > CDbl(Label283.Caption) Then

MsgBox "Auf dem ausgewählten Lagerplatz gibt es nicht so viel Artikel von dem ausgewählten Lieferant wie es eingetragen ist!", 48, "http://excel.hpage.de"

TextBox53.SetFocus

Exit Sub

End If

If TextBox54.Value = "" Then

TextBox53.Value = ""

MsgBox "Menge ist nicht eingetragen!", 48, "http://excel.hpage.de"

TextBox53.SetFocus

Exit Sub

End If

AAPP2 = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox45.Value, lookat:=xlWhole).Row)

AAPP3 = ComboBox43.ListIndex + 2

AAPP4 = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox46.Value, lookat:=xlWhole).Row)

AAPP6 = ComboBox43.ListIndex * 7 + 2

AAPP7 = (AAPP4 - 2) * 8 + 2

AAPP8 = CDbl(ZZFFF8.Range("b2:b1048571").Cells.Find(What:=ComboBox42.Value, lookat:=xlWhole).Row)

If ComboBox40.Value = "" Then

TextBox1.Value = "ComboBox40"

Call ZLIPA1

††† = CDbl(TextBox2.Value)

TextBox3.Value = †††

Else:

††† = ComboBox40.ListIndex + 2

TextBox3.Value = †††

End If

If ComboBox41.Value = "" Then

TextBox1.Value = "CommandButton41"

Call ZLIPA1

AAPP1 = CLng(TextBox2.Value)

TextBox1.Value = "EStobezID"

Call ZLIPA1

AAPP5 = CLng(TextBox2.Value)

If AAPP1 > 100007 Then

MsgBox "Es sind schon 100000 Buchungssätze eingetragen worden!", 48, "http://excel.hpage.de"

Exit Sub

End If

TextBox1.Value = "SPOS"

Call ZLIPA1

SPOS = CLng(TextBox2.Value)

If SPOS > 40 Then

MsgBox "Der Entnahmeschein " & ComboBox40.Value & " hat schon 40 Positionen!", 48, "http://excel.hpage.de"

Exit Sub

End If

Label114.Caption = TextBox54.Value

ZZFFF2.Cells(AAPP1, 1).Value = AAPP1 - 7

ZZFFF2.Cells(AAPP1, 2).Value = "E.Sch. " & ††† - 1 & "/" & SPOS

ZZFFF2.Cells(AAPP1, 3).Value = CDate(TextBox52.Value)

ZZFFF2.Cells(AAPP1, 4).Value = ZZFFF3.Cells(AAPP3, 2)

ZZFFF2.Cells(AAPP1, 5).Value = ZZFFF3.Cells(AAPP3, 3)

ZZFFF2.Cells(AAPP1, 6).Value = ZZFFF3.Cells(AAPP3, 4)

ZZFFF2.Cells(AAPP1, 7).Value = CDbl(TextBox53.Value)

ZZFFF2.Cells(AAPP1, 8).Value = CDbl(Label114.Caption)

ZZFFF2.Cells(AAPP1, 9).Value = ZZFFF7.Cells(AAPP2, 2)

ZZFFF2.Cells(AAPP1, 10).Value = ZZFFF5.Cells(AAPP4, 2)

ZZFFF2.Cells(AAPP1, 11).Value = ZZFFF8.Cells(AAPP8, 2)

ZZFFF2.Cells(AAPP5, 59).Value = AAPP1 - 7

ZZFFF2.Cells(AAPP5, 60).Value = AAPP1

ZZFFF2.Cells(AAPP5, 61).Value = AAPP3

ZZFFF2.Cells(AAPP5, 62).Value = AAPP2

ZZFFF2.Cells(AAPP5, 63).Value = AAPP4

ZZFFF2.Cells(AAPP5, 65).Value = AAPP6

ZZFFF2.Cells(AAPP5, 67).Value = AAPP7

ZZFFF2.Cells(AAPP5, 73).Value = AAPP8

ZZFFF2.Cells(AAPP5, 74).Value = †††

ZZFFF2.Cells(AAPP5, 75).Value = SPOS

ZZFFF2.Cells(AAPP5, 76).Value = (SPOS - 1) * 11 + 2

AAAZ1 = ZZFFF2.Cells(AAPP5, 76).Value

ZZFFF9.Cells(†††, 1).Value = ††† - 1

ZZFFF9.Cells(†††, 442).Value = ††† - 1

ZZFFF9.Cells(†††, AAAZ1).Value = SPOS

ZZFFF9.Cells(†††, 443).Value = ZZFFF9.Cells(†††, 443).Value + 1

ZZFFF9.Cells(†††, AAAZ1 + 1).Value = CDate(TextBox52.Value)

ZZFFF9.Cells(†††, AAAZ1 + 2).Value = ZZFFF3.Cells(AAPP3, 2)

ZZFFF9.Cells(†††, AAAZ1 + 3).Value = ZZFFF3.Cells(AAPP3, 3)

ZZFFF9.Cells(†††, AAAZ1 + 4).Value = ZZFFF3.Cells(AAPP3, 4)

ZZFFF9.Cells(†††, AAAZ1 + 5).Value = CDbl(Label286.Caption)

ZZFFF9.Cells(†††, AAAZ1 + 6).Value = CDbl(TextBox53.Value)

ZZFFF9.Cells(†††, AAAZ1 + 7).Value = CDbl(Label114.Caption)

ZZFFF9.Cells(†††, AAAZ1 + 8).Value = ZZFFF8.Cells(AAPP8, 2)

ZZFFF9.Cells(†††, AAAZ1 + 9).Value = ZZFFF7.Cells(AAPP2, 2)

ZZFFF9.Cells(†††, AAAZ1 + 10).Value = ZZFFF5.Cells(AAPP4, 2)

ZZFFF9.Cells(†††, SPOS + 445).Value = ZZFFF2.Cells(AAPP1, 1).Value

ZZFFF9.Cells(†††, SPOS + 487).Value = AAPP1

Call ComboBox40_Change

With ZZFFF9

ComboBox40.RowSource = .Range(.Cells(2, 1), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 1)).Address(External:=True)

NOMSC = ZZFFF9.Cells(†††, 1).Value

End With

ZZFFF7.Cells(AAPP2, 13) = ZZFFF7.Cells(AAPP2, 13) - CDbl(TextBox53.Value)

If ZZFFF7.Cells(AAPP2, 13) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 13) = ""

End If

ZZFFF7.Cells(AAPP2, 14) = ZZFFF7.Cells(AAPP2, 14) - CDbl(Label114.Caption)

If ZZFFF7.Cells(AAPP2, 14) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 14) = ""

End If

If ZZFFF7.Cells(AAPP2, 13) = "" Or ZZFFF7.Cells(AAPP2, 14) = "" Then

ZZFFF7.Cells(AAPP2, 13) = ""

ZZFFF7.Cells(AAPP2, 14) = ""

End If

ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2) = ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2) - CDbl(TextBox53.Value)

If ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2) = ""

End If

ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2 + 1) = ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2 + 1) - CDbl(Label114.Caption)

If ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2 + 1) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2 + 1) = ""

End If

If ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2) = "" Or ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2 + 1) = "" Then

ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2) = ""

ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2 + 1) = ""

End If

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2) = ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2) - CDbl(TextBox53.Value)

If ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2) = ""

End If

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) = ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) - CDbl(Label114.Caption)

If ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) = ""

End If

If ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2) = "" Or ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) = "" Then

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2) = ""

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) = ""

End If

ZZFFF7.Cells(AAPP2, 9186 + (AAPP3 - 2) * 2) = ZZFFF7.Cells(AAPP2, 9186 + (AAPP3 - 2) * 2) + CDbl(TextBox53.Value)

ZZFFF7.Cells(AAPP2, 9186 + (AAPP3 - 2) * 2 + 1) = ZZFFF7.Cells(AAPP2, 9186 + (AAPP3 - 2) * 2 + 1) + CDbl(Label114.Caption)

TextBox1.Value = "ZeileArtikelkontoIDLeer"

TextBox4.Value = ZZFFF2.Cells(AAPP5, 65).Value

Call ZLIPA1

AAAZ3 = CLng(TextBox2.Value)

ZZFFF2.Cells(AAPP5, 66).Value = CLng(TextBox2.Value)

ZZFFF4.Cells(AAAZ3, AAPP6) = ZZFFF2.Cells(AAPP1, 1)

ZZFFF4.Cells(AAAZ3, AAPP6 + 1) = CDate(TextBox52.Value)

ZZFFF4.Cells(AAAZ3, AAPP6 + 2) = "E.Sch. " & ††† - 1 & "/" & SPOS

ZZFFF4.Cells(AAAZ3, AAPP6 + 3) = CDbl(TextBox53.Value) * -1

ZZFFF4.Cells(AAAZ3, AAPP6 + 4) = CDbl(Label114.Caption) * -1

ZZFFF4.Cells(AAAZ3, AAPP6 + 5) = ZZFFF8.Cells(AAPP8, 2) & "/" & ZZFFF7.Cells(AAPP2, 2)

ZZFFF4.Cells(AAAZ3, AAPP6 + 6) = ZZFFF5.Cells(AAPP4, 2)

ZZFFF4.Cells(4, AAPP6 + 3).FormulaR1C1 = "=SUM(R[5]C:R[1048567]C)"

ZZFFF4.Cells(4, AAPP6 + 3) = ZZFFF4.Cells(4, AAPP6 + 3)

If ZZFFF4.Cells(4, AAPP6 + 3) <= 0.001 Then

ZZFFF4.Cells(4, AAPP6 + 3) = ""

End If

ZZFFF4.Cells(5, AAPP6 + 4).FormulaR1C1 = "=SUM(R[4]C:R[1048566]C)"

ZZFFF4.Cells(5, AAPP6 + 4) = ZZFFF4.Cells(5, AAPP6 + 4)

If ZZFFF4.Cells(5, AAPP6 + 4) <= 0.001 Then

ZZFFF4.Cells(5, AAPP6 + 4) = ""

End If

ZZFFF4.Cells(6, AAPP6) = ""

If ZZFFF4.Cells(4, AAPP6 + 3) <> "" And ZZFFF4.Cells(4, AAPP6 + 3) <> 0 Then

ZZFFF4.Cells(6, AAPP6) = Round(ZZFFF4.Cells(5, AAPP6 + 4) / ZZFFF4.Cells(4, AAPP6 + 3), 2)

End If

ZZFFF3.Cells(AAPP3, 6) = ZZFFF4.Cells(4, AAPP6 + 3)

ZZFFF3.Cells(AAPP3, 7) = ZZFFF4.Cells(5, AAPP6 + 4)

ZZFFF3.Cells(AAPP3, 8) = ZZFFF4.Cells(6, AAPP6)

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) = ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) - CDbl(TextBox53.Value)

If ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) <= 0.001 Then

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) = ""

End If

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) = ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) - CDbl(Label114.Caption)

If ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) <= 0.001 Then

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) = ""

End If

If ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) = "" Or ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) = "" Then

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) = ""

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) = ""

End If

ZZFFF3.Cells(AAPP3, 17) = ZZFFF3.Cells(AAPP3, 17) + CDbl(TextBox53.Value)

ZZFFF3.Cells(AAPP3, 18) = ZZFFF3.Cells(AAPP3, 18) + CDbl(Label114.Caption)

If ZZFFF3.Cells(AAPP3, 17) > 0 Then

ZZFFF3.Cells(AAPP3, 19) = Round(ZZFFF3.Cells(AAPP3, 18) / ZZFFF3.Cells(AAPP3, 17), 2)

End If

TextBox1.Value = "ZeileLagerkontoIDLeer"

TextBox4.Value = AAPP7

Call ZLIPA1

AAAZ3 = CLng(TextBox2.Value)

ZZFFF2.Cells(AAPP5, 68).Value = CLng(TextBox2.Value)

ZZFFF6.Cells(AAAZ3, AAPP7) = ZZFFF2.Cells(AAPP1, 1)

ZZFFF6.Cells(AAAZ3, AAPP7 + 1) = CDate(TextBox52.Value)

ZZFFF6.Cells(AAAZ3, AAPP7 + 2) = "E.Sch. " & ††† - 1 & "/" & SPOS

ZZFFF6.Cells(AAAZ3, AAPP7 + 3) = ZZFFF3.Cells(AAPP3, 2)

ZZFFF6.Cells(AAAZ3, AAPP7 + 4) = ZZFFF3.Cells(AAPP3, 3) & "_" & ZZFFF3.Cells(AAPP3, 4)

ZZFFF6.Cells(AAAZ3, AAPP7 + 5) = CDbl(TextBox53.Value) * -1

ZZFFF6.Cells(AAAZ3, AAPP7 + 6) = CDbl(Label114.Caption) * -1

ZZFFF6.Cells(AAAZ3, AAPP7 + 7) = ZZFFF8.Cells(AAPP8, 2) & "/" & ZZFFF7.Cells(AAPP2, 2)

ZZFFF6.Cells(2, AAPP7 + 5).FormulaR1C1 = "=SUM(R[3]C:R[1048569]C)"

ZZFFF6.Cells(2, AAPP7 + 5) = ZZFFF6.Cells(2, AAPP7 + 5)

If ZZFFF6.Cells(2, AAPP7 + 5) <= 0.001 Then

ZZFFF6.Cells(2, AAPP7 + 5) = ""

End If

ZZFFF6.Cells(3, AAPP7 + 6).FormulaR1C1 = "=SUM(R[2]C:R[1048568]C)"

ZZFFF6.Cells(3, AAPP7 + 6) = ZZFFF6.Cells(3, AAPP7 + 6)

If ZZFFF6.Cells(3, AAPP7 + 6) <= 0.001 Then

ZZFFF6.Cells(3, AAPP7 + 6) = ""

End If

ZZFFF5.Cells(AAPP4, 3) = ZZFFF6.Cells(2, AAPP7 + 5)

ZZFFF5.Cells(AAPP4, 4) = ZZFFF6.Cells(3, AAPP7 + 6)

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2) = ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2) - CDbl(TextBox53.Value)

If ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2) <= 0.001 Then

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2) = ""

End If

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) = ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) - CDbl(Label114.Caption)

If ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) <= 0.001 Then

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) = ""

End If

If ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2) = "" Or ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) = "" Then

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2) = ""

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) = ""

End If

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2) = ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2) - CDbl(TextBox53.Value)

If ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2) <= 0.001 Then

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2) = ""

End If

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) = ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) - CDbl(Label114.Caption)

If ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) <= 0.001 Then

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) = ""

End If

If ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2) = "" Or ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) = "" Then

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2) = ""

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) = ""

End If

ZZFFF8.Cells(AAPP8, 13) = ZZFFF8.Cells(AAPP8, 13) + CDbl(TextBox53.Value)

ZZFFF8.Cells(AAPP8, 14) = ZZFFF8.Cells(AAPP8, 14) + CDbl(Label114.Caption)

ZZFFF8.Cells(AAPP8, 45 + (AAPP3 - 2) * 2) = ZZFFF8.Cells(AAPP8, 45 + (AAPP3 - 2) * 2) + CDbl(TextBox53.Value)

ZZFFF8.Cells(AAPP8, 45 + (AAPP3 - 2) * 2 + 1) = ZZFFF8.Cells(AAPP8, 45 + (AAPP3 - 2) * 2 + 1) + CDbl(Label114.Caption)

ZZFFF8.Cells(AAPP8, 2567 + (AAPP2 - 2) * 2) = ZZFFF8.Cells(AAPP8, 2567 + (AAPP2 - 2) * 2) + CDbl(TextBox53.Value)

ZZFFF8.Cells(AAPP8, 2567 + (AAPP2 - 2) * 2 + 1) = ZZFFF8.Cells(AAPP8, 2567 + (AAPP2 - 2) * 2 + 1) + CDbl(Label114.Caption)

AAPP3 = ComboBox43.ListIndex + 2

AAPP2 = AAPP2 - 2

AAPP4 = AAPP4 - 2

ZZFFF2.Cells(AAPP5, 25).Value = ComboBox43.ListIndex + 2

ZZFFF2.Cells(AAPP5, 26).Value = ComboBox45.ListIndex

ZZFFF2.Cells(AAPP5, 27).Value = ComboBox46.ListIndex

AAAZ1 = ZZFFF3.Cells(AAPP3, 16383) + AAPP2

AAAC = ZZFFF3.Cells(AAPP3, 16384)

ZZFFF3.Cells(AAAZ1, AAAC + (2 * AAPP4)) = ZZFFF3.Cells(AAAZ1, AAAC + (2 * AAPP4)) - CDbl(TextBox53.Value)

If ZZFFF3.Cells(AAAZ1, AAAC + (2 * AAPP4)) <= 0.001 Then

ZZFFF3.Cells(AAAZ1, AAAC + (2 * AAPP4)) = ""

End If

ZZFFF3.Cells(AAAZ1, AAAC + (2 * AAPP4) + 1) = ZZFFF3.Cells(AAAZ1, AAAC + (2 * AAPP4) + 1) - CDbl(Label114.Caption)

If ZZFFF3.Cells(AAAZ1, AAAC + (2 * AAPP4) + 1) <= 0.001 Then

ZZFFF3.Cells(AAAZ1, AAAC + (2 * AAPP4) + 1) = ""

End If

If ZZFFF3.Cells(AAAZ1, AAAC + (2 * AAPP4)) = "" Or ZZFFF3.Cells(AAAZ1, AAAC + (2 * AAPP4) + 1) = "" Then

ZZFFF3.Cells(AAAZ1, AAAC + (2 * AAPP4)) = ""

ZZFFF3.Cells(AAAZ1, AAAC + (2 * AAPP4) + 1) = ""

End If

Call ZLIPA2

ComboBox43.Value = ""

ComboBox40.SetFocus

ComboBox40.Value = NOMSC

ComboBox41.SetFocus

ComboBox41.Value = SPOS

TextBox53.Value = ""

End If

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton33_Click()

On Error GoTo EERR

Dim ††† As Long

Dim AAAC As Long

Dim AAPP2 As Long

Dim AAPP3 As Long

Dim AAPP4 As Long

Dim AAPP5 As Long

Dim AAPP6 As Long

Dim AAPP7 As Long

Dim AAAZ As Long

Dim AAAZ2 As Long

Dim AAAZ3 As Long

TextBox44.SetFocus

TextBox45.SetFocus

TextBox43.SetFocus

TextBox1.Value = "CommandButton33"

If ComboBox25.Value <> "" Then

ComboBox25.Value = ""

End If

If ComboBox26.Value = "" Then

MsgBox "Lieferant ist nicht eingetragen!", 48, "http://excel.hpage.de"

ComboBox26.SetFocus

Exit Sub

End If

If ComboBox27.Value = "" Then

MsgBox "Artikeln ist nicht eingetragen!", 48, "http://excel.hpage.de"

ComboBox27.SetFocus

Exit Sub

End If

If ComboBox29.Value = "" Then

MsgBox "Lagerplatz ist nicht eingetragen!", 48, "http://excel.hpage.de"

ComboBox29.SetFocus

Exit Sub

End If

If TextBox45.Value = "" Or TextBox45.Value = "0" Then

MsgBox "Gutschriftwert ist nicht eingetragen!", 48, "http://excel.hpage.de"

TextBox45.SetFocus

Exit Sub

End If

If Label151.Caption = "" Then

MsgBox "Wert vom ausgewählten Artikel von dem ausgewählten Lieferant auf dem ausgewählten Lagerplatz ist weniger als Gutschriftwert!", 48, "http://excel.hpage.de"

TextBox45.SetFocus

Exit Sub

End If

If Label151.Caption <> "" Then

If CDbl(Label151.Caption) < CDbl(TextBox45.Value) Then

MsgBox "Wert vom ausgewählten Artikel von dem ausgewählten Lieferant auf dem ausgewählten Lagerplatz ist weniger als Gutschriftwert!", 48, "http://excel.hpage.de"

TextBox45.SetFocus

Exit Sub

End If

End If

If Label151.Caption <> "" Then

If CDbl(Label151.Caption) = CDbl(TextBox45.Value) Then

MsgBox "Wert vom ausgewählten Artikel von dem ausgewählten Lieferant auf dem ausgewählten Lagerplatz ist gleich dem Gutschriftwert!", 48, "http://excel.hpage.de"

TextBox45.SetFocus

Exit Sub

End If

End If

If Label151.Caption <> "" Then

If (CDbl(Label151.Caption) - CDbl(TextBox45.Value)) / CDbl(Label149.Caption) < 0.01 Then

MsgBox "Wert von jeder Artikeleinheit soll nicht weniger als ein Cent sein!", 48, "http://excel.hpage.de"

TextBox45.SetFocus

Exit Sub

End If

End If

If CDbl(TextBox45.Value) < 0 Then

TextBox45.Value = CDbl(TextBox45.Value) * -1

End If

AAPP2 = ComboBox26.ListIndex + 2

AAPP3 = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox27.Value, lookat:=xlWhole).Row)

AAPP4 = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox29.Value, lookat:=xlWhole).Row)

AAPP6 = (AAPP3 - 2) * 7 + 2

AAPP7 = (AAPP4 - 2) * 8 + 2

If ComboBox25.Value = "" Then

Call ZLIPA1

††† = CLng(TextBox2.Value)

TextBox1.Value = "GStobezID"

Call ZLIPA1

AAPP5 = CLng(TextBox2.Value)

If ††† > 100007 Then

MsgBox "Es sind schon 100000 Buchungssätze eingetragen worden!", 48, "http://excel.hpage.de"

Exit Sub

End If

ZZFFF2.Cells(†††, 1).Value = ††† - 7

ZZFFF2.Cells(†††, 2).Value = TextBox43.Value

ZZFFF2.Cells(†††, 3).Value = CDate(TextBox44.Value)

AAAZ2 = CDbl(Month(TextBox44.Value))

ZZFFF2.Cells(†††, 4).Value = ZZFFF3.Cells(AAPP3, 2)

ZZFFF2.Cells(†††, 5).Value = ZZFFF3.Cells(AAPP3, 3)

ZZFFF2.Cells(†††, 6).Value = ZZFFF3.Cells(AAPP3, 4)

ZZFFF2.Cells(†††, 8).Value = CDbl(TextBox45.Value) * -1

ZZFFF2.Cells(†††, 9).Value = ZZFFF7.Cells(AAPP2, 2)

ZZFFF2.Cells(†††, 10).Value = ZZFFF5.Cells(AAPP4, 2)

ZZFFF2.Cells(AAPP5, 29).Value = ††† - 7

ZZFFF2.Cells(AAPP5, 30).Value = †††

ZZFFF2.Cells(AAPP5, 34).Value = AAAZ2

ZZFFF2.Cells(AAPP5, 31).Value = AAPP3

ZZFFF2.Cells(AAPP5, 32).Value = AAPP2

ZZFFF2.Cells(AAPP5, 33).Value = AAPP4

ZZFFF2.Cells(AAPP5, 35).Value = AAPP6

ZZFFF2.Cells(AAPP5, 37).Value = AAPP7

ZZFFF7.Cells(AAPP2, 14) = ZZFFF7.Cells(AAPP2, 14) - CDbl(TextBox45.Value)

If ZZFFF7.Cells(AAPP2, 14) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 14) = ""

End If

ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2 + 1) = ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2 + 1) - CDbl(TextBox45.Value)

If ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2 + 1) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2 + 1) = ""

End If

ZZFFF7.Cells(AAPP2, 6664 + (AAPP3 - 2) * 2 + 1) = ZZFFF7.Cells(AAPP2, 6664 + (AAPP3 - 2) * 2 + 1) - CDbl(TextBox45.Value)

If ZZFFF7.Cells(AAPP2, 6664 + (AAPP3 - 2) * 2 + 1) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 6664 + (AAPP3 - 2) * 2 + 1) = ""

End If

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) = ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) - CDbl(TextBox45.Value)

If ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) = ""

End If

TextBox1.Value = "ZeileArtikelkontoIDLeer"

TextBox4.Value = ZZFFF2.Cells(AAPP5, 35).Value

Call ZLIPA1

AAAZ3 = CLng(TextBox2.Value)

ZZFFF2.Cells(AAPP5, 36).Value = CLng(TextBox2.Value)

ZZFFF4.Cells(AAAZ3, AAPP6) = ZZFFF2.Cells(†††, 1)

ZZFFF4.Cells(AAAZ3, AAPP6 + 1) = CDate(TextBox44.Value)

ZZFFF4.Cells(AAAZ3, AAPP6 + 2) = TextBox43.Value

ZZFFF4.Cells(AAAZ3, AAPP6 + 4) = CDbl(TextBox45.Value) * -1

ZZFFF4.Cells(AAAZ3, AAPP6 + 5) = ZZFFF7.Cells(AAPP2, 2)

ZZFFF4.Cells(AAAZ3, AAPP6 + 6) = ZZFFF5.Cells(AAPP4, 2)

ZZFFF4.Cells(4, AAPP6 + 3).FormulaR1C1 = "=SUM(R[5]C:R[1048567]C)"

ZZFFF4.Cells(4, AAPP6 + 3) = ZZFFF4.Cells(4, AAPP6 + 3)

ZZFFF4.Cells(5, AAPP6 + 4).FormulaR1C1 = "=SUM(R[4]C:R[1048566]C)"

ZZFFF4.Cells(5, AAPP6 + 4) = ZZFFF4.Cells(5, AAPP6 + 4)

If ZZFFF4.Cells(4, AAPP6 + 3) <> "" And ZZFFF4.Cells(4, AAPP6 + 3) <> 0 Then

ZZFFF4.Cells(6, AAPP6) = Round(ZZFFF4.Cells(5, AAPP6 + 4) / ZZFFF4.Cells(4, AAPP6 + 3), 2)

End If

ZZFFF3.Cells(AAPP3, 6) = ZZFFF4.Cells(4, AAPP6 + 3)

ZZFFF3.Cells(AAPP3, 7) = ZZFFF4.Cells(5, AAPP6 + 4)

ZZFFF3.Cells(AAPP3, 8) = ZZFFF4.Cells(6, AAPP6)

ZZFFF3.Cells(AAPP3, 14) = ZZFFF3.Cells(AAPP3, 14) - CDbl(TextBox45.Value)

If ZZFFF3.Cells(AAPP3, 14) <= 0.001 Then

ZZFFF3.Cells(AAPP3, 14) = ""

End If

If ZZFFF3.Cells(AAPP3, 13) > 0 Then

ZZFFF3.Cells(AAPP3, 15) = Round(ZZFFF3.Cells(AAPP3, 14) / ZZFFF3.Cells(AAPP3, 13), 2)

End If

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) = ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) - CDbl(TextBox45.Value)

If ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) <= 0.001 Then

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) = ""

End If

TextBox1.Value = "ZeileLagerkontoIDLeer"

TextBox4.Value = AAPP7

Call ZLIPA1

AAAZ3 = CLng(TextBox2.Value)

ZZFFF2.Cells(AAPP5, 38).Value = CLng(TextBox2.Value)

ZZFFF6.Cells(AAAZ3, AAPP7) = ZZFFF2.Cells(†††, 1)

ZZFFF6.Cells(AAAZ3, AAPP7 + 1) = CDate(TextBox44.Value)

ZZFFF6.Cells(AAAZ3, AAPP7 + 2) = TextBox43.Value

ZZFFF6.Cells(AAAZ3, AAPP7 + 3) = ZZFFF3.Cells(AAPP3, 2)

ZZFFF6.Cells(AAAZ3, AAPP7 + 4) = ZZFFF3.Cells(AAPP3, 3) & "_" & ZZFFF3.Cells(AAPP3, 4)

ZZFFF6.Cells(AAAZ3, AAPP7 + 6) = CDbl(TextBox45.Value) * -1

ZZFFF6.Cells(AAAZ3, AAPP7 + 7) = ZZFFF7.Cells(AAPP2, 2)

ZZFFF6.Cells(2, AAPP7 + 5).FormulaR1C1 = "=SUM(R[3]C:R[1048569]C)"

ZZFFF6.Cells(2, AAPP7 + 5) = ZZFFF6.Cells(2, AAPP7 + 5)

ZZFFF6.Cells(3, AAPP7 + 6).FormulaR1C1 = "=SUM(R[2]C:R[1048568]C)"

ZZFFF6.Cells(3, AAPP7 + 6) = ZZFFF6.Cells(3, AAPP7 + 6)

ZZFFF5.Cells(AAPP4, 3) = ZZFFF6.Cells(2, AAPP7 + 5)

ZZFFF5.Cells(AAPP4, 4) = ZZFFF6.Cells(3, AAPP7 + 6)

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) = ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) - CDbl(TextBox45.Value)

If ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) <= 0.001 Then

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) = ""

End If

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) = ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) - CDbl(TextBox45.Value)

If ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) <= 0.001 Then

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) = ""

End If

AAPP2 = ComboBox26.ListIndex

AAPP4 = AAPP4 - 2

ZZFFF2.Cells(AAPP5, 39).Value = ComboBox27.ListIndex + 2

ZZFFF2.Cells(AAPP5, 40).Value = ComboBox26.ListIndex

ZZFFF2.Cells(AAPP5, 41).Value = ComboBox29.ListIndex

AAAZ = ZZFFF3.Cells(AAPP3, 16383) + AAPP2

AAAC = ZZFFF3.Cells(AAPP3, 16384)

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) - CDbl(TextBox45.Value)

If ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) <= 0.001 Then

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) = ""

End If

Call ZLIPA2

With ZZFFF2

ComboBox25.RowSource = .Range(.Cells(8, 29), .Cells(.Cells(Rows.Count, 29).End(xlUp).Row, 29)).Address(External:=True)

End With

ComboBox25.Value = ††† - 7

ComboBox20.Value = ComboBox29.Value

ComboBox21.Value = ComboBox29.Value

ComboBox25.SetFocus

TextBox45.Value = ""

End If

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton29_Click()

On Error GoTo EERR

Dim AAAC As Long

Dim AAPP1 As Long

Dim AAPP2 As Long

Dim AAPP3 As Long

Dim AAPP4 As Long

Dim AAPP5 As Long

Dim AAPP6 As Long

Dim AAPP7 As Long

Dim AAAZ As Long

Dim ††† As Long

TextBox39.SetFocus

TextBox40.SetFocus

TextBox41.SetFocus

TextBox38.SetFocus

TextBox1.Value = "CommandButton29"

If ComboBox16.Value <> "" Then

ComboBox16.Value = ""

End If

If ComboBox17.Value = "" Then

MsgBox "Lieferant ist nicht eingetragen!", 48, "http://excel.hpage.de"

ComboBox17.SetFocus

Exit Sub

End If

If ComboBox18.Value = "" Then

MsgBox "Artikeln ist nicht eingetragen!", 48, "http://excel.hpage.de"

ComboBox18.SetFocus

Exit Sub

End If

If ComboBox22.Value = "" Then

MsgBox "Lagerplatz ist nicht eingetragen!", 48, "http://excel.hpage.de"

ComboBox22.SetFocus

Exit Sub

End If

If TextBox40.Value = "" Then

MsgBox "Menge ist nicht eingetragen!", 48, "http://excel.hpage.de"

TextBox40.SetFocus

Exit Sub

End If

If TextBox41.Value = "" Or TextBox41.Value = "0" Then

MsgBox "Wert ist nicht eingetragen!", 48, "http://excel.hpage.de"

TextBox41.SetFocus

Exit Sub

End If

If Label93.Caption = "" Then

If TextBox40.Value = 0 Then

MsgBox "Bezugskosten kann man noch nicht eintragen, weil Bestand von dem Artikel gleich Null ist!", 48, "http://excel.hpage.de"

TextBox40.SetFocus

Exit Sub

End If

End If

Call crrrch

ZZFFF5.[a10] = ""

ZZFFF5.[a11] = ""

ZZFFF5.[a12] = ""

If Label93.Caption <> "" Then

ZZFFF5.[a10] = CDbl(Label93.Caption) + CDbl(TextBox40)

Else:

ZZFFF5.[a10] = CDbl(TextBox40)

End If

If Label95.Caption <> "" Then

ZZFFF5.[a11] = CDbl(Label95.Caption) + CDbl(TextBox41)

Else:

ZZFFF5.[a11] = CDbl(TextBox41)

End If

If ZZFFF5.[a10] <> 0 Then

ZZFFF5.[a12] = ZZFFF5.[a11] / ZZFFF5.[a10]

End If

If ZZFFF5.[a12] < 0.01 Then

MsgBox "Wert von jeder Artikeleinheit soll nicht weniger als ein Cent sein!", 48, "http://excel.hpage.de"

TextBox40.SetFocus

Exit Sub

End If

If CDbl(TextBox40.Value) < 0 Then

TextBox40.Value = CDbl(TextBox40.Value) * -1

End If

If CDbl(TextBox41.Value) < 0 Then

TextBox41.Value = CDbl(TextBox41.Value) * -1

End If

AAPP2 = ComboBox17.ListIndex + 2

AAPP3 = ComboBox18.ListIndex + 2

AAPP4 = ComboBox22.ListIndex + 2

AAPP6 = ComboBox18.ListIndex * 7 + 2

AAPP7 = ComboBox22.ListIndex * 8 + 2

If ComboBox16.Value = "" Then

Call ZLIPA1

AAPP1 = CLng(TextBox2.Value)

TextBox1.Value = "ZStobezID"

Call ZLIPA1

AAPP5 = CLng(TextBox2.Value)

If AAPP1 > 100007 Then

MsgBox "Es sind schon 100000 Buchungssätze eingetragen worden!", 48, "http://excel.hpage.de"

Exit Sub

End If

ZZFFF2.Cells(AAPP1, 1).Value = AAPP1 - 7

ZZFFF2.Cells(AAPP1, 2).Value = TextBox38.Value

ZZFFF2.Cells(AAPP1, 3).Value = CDate(TextBox39.Value)

ZZFFF2.Cells(AAPP1, 4).Value = ZZFFF3.Cells(AAPP3, 2)

ZZFFF2.Cells(AAPP1, 5).Value = ZZFFF3.Cells(AAPP3, 3)

ZZFFF2.Cells(AAPP1, 6).Value = ZZFFF3.Cells(AAPP3, 4)

ZZFFF2.Cells(AAPP1, 7).Value = CDbl(TextBox40.Value)

ZZFFF2.Cells(AAPP1, 8).Value = CDbl(TextBox41.Value)

ZZFFF2.Cells(AAPP1, 9).Value = ZZFFF7.Cells(AAPP2, 2)

ZZFFF2.Cells(AAPP1, 10).Value = ZZFFF5.Cells(AAPP4, 2)

ZZFFF2.Cells(AAPP5, 15).Value = AAPP1 - 7

ZZFFF2.Cells(AAPP5, 16).Value = AAPP1

ZZFFF2.Cells(AAPP5, 17).Value = AAPP3

ZZFFF2.Cells(AAPP5, 18).Value = AAPP2

ZZFFF2.Cells(AAPP5, 19).Value = AAPP4

ZZFFF2.Cells(AAPP5, 21).Value = AAPP6

ZZFFF2.Cells(AAPP5, 23).Value = AAPP7

ZZFFF7.Cells(AAPP2, 13) = ZZFFF7.Cells(AAPP2, 13) + CDbl(TextBox40.Value)

ZZFFF7.Cells(AAPP2, 14) = ZZFFF7.Cells(AAPP2, 14) + CDbl(TextBox41.Value)

ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2) = ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2) + CDbl(TextBox40.Value)

ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2 + 1) = ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2 + 1) + CDbl(TextBox41.Value)

ZZFFF7.Cells(AAPP2, 6664 + (AAPP3 - 2) * 2) = ZZFFF7.Cells(AAPP2, 6664 + (AAPP3 - 2) * 2) + CDbl(TextBox40.Value)

ZZFFF7.Cells(AAPP2, 6664 + (AAPP3 - 2) * 2 + 1) = ZZFFF7.Cells(AAPP2, 6664 + (AAPP3 - 2) * 2 + 1) + CDbl(TextBox41.Value)

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2) = ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2) + CDbl(TextBox40.Value)

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) = ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) + CDbl(TextBox41.Value)

TextBox1.Value = "ZeileArtikelkontoIDLeer"

TextBox4.Value = ZZFFF2.Cells(AAPP5, 21).Value

Call ZLIPA1

††† = CLng(TextBox2.Value)

ZZFFF2.Cells(AAPP5, 22).Value = CLng(TextBox2.Value)

ZZFFF4.Cells(†††, AAPP6) = ZZFFF2.Cells(AAPP1, 1)

ZZFFF4.Cells(†††, AAPP6 + 1) = CDate(TextBox39.Value)

ZZFFF4.Cells(†††, AAPP6 + 2) = TextBox38.Value

ZZFFF4.Cells(†††, AAPP6 + 3) = CDbl(TextBox40.Value)

ZZFFF4.Cells(†††, AAPP6 + 4) = CDbl(TextBox41.Value)

ZZFFF4.Cells(†††, AAPP6 + 5) = ZZFFF7.Cells(AAPP2, 2)

ZZFFF4.Cells(†††, AAPP6 + 6) = ZZFFF5.Cells(AAPP4, 2)

ZZFFF4.Cells(4, AAPP6 + 3).FormulaR1C1 = "=SUM(R[5]C:R[1048567]C)"

ZZFFF4.Cells(4, AAPP6 + 3) = ZZFFF4.Cells(4, AAPP6 + 3)

ZZFFF4.Cells(5, AAPP6 + 4).FormulaR1C1 = "=SUM(R[4]C:R[1048566]C)"

ZZFFF4.Cells(5, AAPP6 + 4) = ZZFFF4.Cells(5, AAPP6 + 4)

If ZZFFF4.Cells(4, AAPP6 + 3) <> "" And ZZFFF4.Cells(4, AAPP6 + 3) <> 0 Then

ZZFFF4.Cells(6, AAPP6) = Round(ZZFFF4.Cells(5, AAPP6 + 4) / ZZFFF4.Cells(4, AAPP6 + 3), 2)

End If

ZZFFF3.Cells(AAPP3, 6) = ZZFFF4.Cells(4, AAPP6 + 3)

ZZFFF3.Cells(AAPP3, 7) = ZZFFF4.Cells(5, AAPP6 + 4)

ZZFFF3.Cells(AAPP3, 8) = ZZFFF4.Cells(6, AAPP6)

ZZFFF3.Cells(AAPP3, 13) = ZZFFF3.Cells(AAPP3, 13) + CDbl(TextBox40.Value)

ZZFFF3.Cells(AAPP3, 14) = ZZFFF3.Cells(AAPP3, 14) + CDbl(TextBox41.Value)

If ZZFFF3.Cells(AAPP3, 13) > 0 Then

ZZFFF3.Cells(AAPP3, 15) = Round(ZZFFF3.Cells(AAPP3, 14) / ZZFFF3.Cells(AAPP3, 13), 2)

End If

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) = ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) + CDbl(TextBox40.Value)

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) = ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) + CDbl(TextBox41.Value)

TextBox1.Value = "ZeileLagerkontoIDLeer"

TextBox4.Value = AAPP7

Call ZLIPA1

††† = CLng(TextBox2.Value)

ZZFFF2.Cells(AAPP5, 24).Value = CLng(TextBox2.Value)

ZZFFF6.Cells(†††, AAPP7) = ZZFFF2.Cells(AAPP1, 1)

ZZFFF6.Cells(†††, AAPP7 + 1) = CDate(TextBox39.Value)

ZZFFF6.Cells(†††, AAPP7 + 2) = TextBox38.Value

ZZFFF6.Cells(†††, AAPP7 + 3) = ZZFFF3.Cells(AAPP3, 2)

ZZFFF6.Cells(†††, AAPP7 + 4) = ZZFFF3.Cells(AAPP3, 3) & "_" & ZZFFF3.Cells(AAPP3, 4)

ZZFFF6.Cells(†††, AAPP7 + 5) = CDbl(TextBox40.Value)

ZZFFF6.Cells(†††, AAPP7 + 6) = CDbl(TextBox41.Value)

ZZFFF6.Cells(†††, AAPP7 + 7) = ZZFFF7.Cells(AAPP2, 2)

ZZFFF6.Cells(2, AAPP7 + 5).FormulaR1C1 = "=SUM(R[3]C:R[1048569]C)"

ZZFFF6.Cells(2, AAPP7 + 5) = ZZFFF6.Cells(2, AAPP7 + 5)

ZZFFF6.Cells(3, AAPP7 + 6).FormulaR1C1 = "=SUM(R[2]C:R[1048568]C)"

ZZFFF6.Cells(3, AAPP7 + 6) = ZZFFF6.Cells(3, AAPP7 + 6)

ZZFFF5.Cells(AAPP4, 3) = ZZFFF6.Cells(2, AAPP7 + 5)

ZZFFF5.Cells(AAPP4, 4) = ZZFFF6.Cells(3, AAPP7 + 6)

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2) = ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2) + CDbl(TextBox40.Value)

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) = ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) + CDbl(TextBox41.Value)

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2) = ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2) + CDbl(TextBox40.Value)

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) = ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) + CDbl(TextBox41.Value)

AAPP3 = ComboBox18.ListIndex + 2

AAPP2 = ComboBox17.ListIndex

AAPP4 = ComboBox22.ListIndex

ZZFFF2.Cells(AAPP5, 25).Value = ComboBox18.ListIndex + 2

ZZFFF2.Cells(AAPP5, 26).Value = ComboBox17.ListIndex

ZZFFF2.Cells(AAPP5, 27).Value = ComboBox22.ListIndex

AAAZ = ZZFFF3.Cells(AAPP3, 16383) + AAPP2

AAAC = ZZFFF3.Cells(AAPP3, 16384)

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) + CDbl(TextBox40.Value)

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) + CDbl(TextBox41.Value)

Call ZLIPA2

With ZZFFF2

ComboBox16.RowSource = .Range(.Cells(8, 15), .Cells(.Cells(Rows.Count, 15).End(xlUp).Row, 15)).Address(External:=True)

End With

ComboBox16.Value = AAPP1 - 7

ComboBox20.Value = ComboBox22.Value

ComboBox21.Value = ComboBox22.Value

ComboBox16.SetFocus

TextBox41.Value = ""

End If

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox40_Change()

On Error GoTo EERR

Dim SCHOT As Long

Dim POMS As Long

Dim AAPP1 As Long

Dim ††† As Long

ZZFFF10.Range("a16:k55").Value = ""

If ComboBox40.Value <> "" Then

††† = CDbl(ZZFFF9.Range("a2:a1048571").Cells.Find(What:=ComboBox40.Value, lookat:=xlWhole).Row)

End If

††† = 16

AAPP1 = ComboBox40.ListIndex + 2

ZZFFF10.Range("a16:k55").Value = ""

If ComboBox40.Value <> "" Then

ListBox7.ListIndex = ComboBox40.ListIndex

Else:

ListBox7.ListIndex = ListBox7.ListCount - 1

End If

If ComboBox40.Value <> "" Then

ZZFFF10.[a13] = "Entnahmeschein"

ZZFFF10.[d13] = "Nr."

ZZFFF10.[e13] = ComboBox40.ListIndex + 1

ZZFFF10.[a15] = "Position-Nr."

ZZFFF10.[b15] = "Datum"

ZZFFF10.[c15] = "Artikel-Nr."

ZZFFF10.[d15] = "Bezeichnung"

ZZFFF10.[e15] = "Einheit"

ZZFFF10.[f15] = "Preis"

ZZFFF10.[g15] = "Menge"

ZZFFF10.[h15] = "Betrag"

ZZFFF10.[i15] = "Kunden Nr."

ZZFFF10.[j15] = "Lief.-Nr."

ZZFFF10.[k15] = "Lagerplatz"

For SCHOT = 0 To 39

If ZZFFF9.Cells(AAPP1, SCHOT * 11 + 2) <> "" Then

For POMS = 0 To 10

ZZFFF10.Cells(†††, 1 + POMS) = ZZFFF9.Cells(AAPP1, SCHOT * 11 + 2 + POMS)

Next POMS

††† = ††† + 1

End If

Next SCHOT

ZZFFF10.Range("b16:b55").NumberFormat = "m/d/yyyy"

End If

With ZZFFF10

ComboBox41.RowSource = .Range(.Cells(16, 1), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 1)).Address(External:=True)

End With

Exit Sub

EERR:

ComboBox40.Value = ""

End Sub

 

Private Sub ComboBox40_Enter()

On Error GoTo EERR

ZZFFF9.Cells(1, 442) = "Ent.Sch.Nr."

ZZFFF9.Cells(1, 443) = "Anzahl der Positionen"

TextBox1.Value = "ComboBox40"

Label254.Visible = False

ComboBox47.Visible = False

ListBox7.BoundColumn = 2

ListBox7.ColumnCount = 2

ListBox7.BackColor = &HFFC0C0

With ZZFFF9

ListBox7.RowSource = .Range(.Cells(2, 442), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 443)).Address(External:=True)

End With

If ComboBox40.Value <> "" Then

ListBox7.ListIndex = ComboBox40.ListIndex

Else:

ListBox7.ListIndex = ListBox7.ListCount - 1

End If

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox5_Change()

On Error GoTo EERR

Dim AAPP As Long

Dim AAAZ As Long

If TextBox1.Value = "ComboBox5" Then

ComboBox5.BackColor = &HFFFF&

ComboBox6.BackColor = &HFFFFFF

ComboBox7.BackColor = &HFFFFFF

If ComboBox5.Value <> "" Then

AAAZ = CDbl(ZZFFF7.Range("c2:c3001").Cells.Find(What:=ComboBox5.Value, lookat:=xlWhole).Row)

AAPP = ComboBox5.ListIndex + 2

ComboBox7.Value = ZZFFF7.Cells(AAPP, 2).Value

TextBox18.Value = ZZFFF7.Cells(AAPP, 3).Value

TextBox19.Value = ZZFFF7.Cells(AAPP, 4).Value

ComboBox8.Value = ZZFFF7.Cells(AAPP, 5).Value

TextBox20.Value = ZZFFF7.Cells(AAPP, 6).Value

TextBox21.Value = ZZFFF7.Cells(AAPP, 7).Value

TextBox22.Value = ZZFFF7.Cells(AAPP, 8).Value

TextBox23.Value = ZZFFF7.Cells(AAPP, 9).Value

TextBox24.Value = ZZFFF7.Cells(AAPP, 10).Value

TextBox25.Value = ZZFFF7.Cells(AAPP, 11).Value

TextBox26.Value = ZZFFF7.Cells(AAPP, 12).Value

Label27.Visible = True

ComboBox9.Visible = True

CommandButton20.Visible = True

ComboBox9.Clear

With ComboBox9

.AddItem "Bestand/Artikeln"

.AddItem "Zugang/Artikeln"

.AddItem "Entnahme/Artikeln"

.AddItem "Lieferant/Lagerplätze"

.AddItem "Lieferant/Artikel/Lagerplätze"

End With

If ComboBox5.Value <> "" Then

ListBox2.ListIndex = ComboBox5.ListIndex

Else:

ListBox2.ListIndex = ListBox2.ListCount - 1

End If

Else:

ComboBox7.Value = ""

TextBox18.Value = ""

TextBox19.Value = ""

ComboBox8.Value = ""

TextBox20.Value = ""

TextBox21.Value = ""

TextBox22.Value = ""

TextBox23.Value = ""

TextBox24.Value = ""

TextBox25.Value = ""

TextBox26.Value = ""

Label27.Visible = False

ComboBox9.Visible = False

CommandButton20.Visible = False

ListBox2.ListIndex = ListBox2.ListCount - 1

End If

End If

Exit Sub

EERR:

ComboBox5.Value = ""

End Sub

 

Private Sub ComboBox5_Enter()

On Error GoTo EERR

Dim AAPP As Long

Dim AAAZ As Long

ComboBox5.BackColor = &HFFFF&

ComboBox6.BackColor = &HFFFFFF

ComboBox7.BackColor = &HFFFFFF

TextBox1.Value = "ComboBox5"

ListBox2.BoundColumn = 13

ListBox2.ColumnCount = 13

ListBox2.BackColor = &HFFFF&

ComboBox6.Value = ""

With ZZFFF7

ListBox2.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 15)).Address(External:=True)

End With

If ComboBox5.Value <> "" Then

ListBox2.ListIndex = ComboBox5.ListIndex

Else:

ListBox2.ListIndex = ListBox2.ListCount - 1

End If

If ComboBox5.Value <> "" Then

AAAZ = CDbl(ZZFFF7.Range("c2:c3001").Cells.Find(What:=ComboBox5.Value, lookat:=xlWhole).Row)

AAPP = ComboBox5.ListIndex + 2

ComboBox7.Value = ZZFFF7.Cells(AAPP, 2).Value

TextBox19.Value = ZZFFF7.Cells(AAPP, 4).Value

ComboBox8.Value = ZZFFF7.Cells(AAPP, 5).Value

TextBox20.Value = ZZFFF7.Cells(AAPP, 6).Value

TextBox21.Value = ZZFFF7.Cells(AAPP, 7).Value

TextBox22.Value = ZZFFF7.Cells(AAPP, 8).Value

TextBox23.Value = ZZFFF7.Cells(AAPP, 9).Value

TextBox24.Value = ZZFFF7.Cells(AAPP, 10).Value

TextBox25.Value = ZZFFF7.Cells(AAPP, 11).Value

TextBox26.Value = ZZFFF7.Cells(AAPP, 12).Value

End If

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox11_Change()

On Error GoTo EERR

Dim AAPP As Long

Dim AAAZ As Long

If TextBox1.Value = "ComboBox11" Then

If ComboBox11.Value <> "" Then

AAAZ = CDbl(ZZFFF8.Range("c2:c50001").Cells.Find(What:=ComboBox11.Value, lookat:=xlWhole).Row)

AAPP = ComboBox11.ListIndex + 2

ComboBox13.Value = ZZFFF8.Cells(AAPP, 2).Value

TextBox28.Value = ZZFFF8.Cells(AAPP, 3).Value

TextBox29.Value = ZZFFF8.Cells(AAPP, 4).Value

ComboBox14.Value = ZZFFF8.Cells(AAPP, 5).Value

TextBox30.Value = ZZFFF8.Cells(AAPP, 6).Value

TextBox31.Value = ZZFFF8.Cells(AAPP, 7).Value

TextBox32.Value = ZZFFF8.Cells(AAPP, 8).Value

TextBox33.Value = ZZFFF8.Cells(AAPP, 9).Value

TextBox34.Value = ZZFFF8.Cells(AAPP, 10).Value

TextBox35.Value = ZZFFF8.Cells(AAPP, 11).Value

TextBox36.Value = ZZFFF8.Cells(AAPP, 12).Value

Label43.Visible = True

ComboBox15.Visible = True

CommandButton24.Visible = True

If ComboBox11.Value <> "" Then

ListBox3.ListIndex = ComboBox11.ListIndex

Else:

ListBox3.ListIndex = ListBox3.ListCount - 1

End If

Else:

ComboBox13.Value = ""

TextBox28.Value = ""

TextBox29.Value = ""

ComboBox14.Value = ""

TextBox30.Value = ""

TextBox31.Value = ""

TextBox32.Value = ""

TextBox33.Value = ""

TextBox34.Value = ""

TextBox35.Value = ""

TextBox36.Value = ""

Label43.Visible = False

ComboBox15.Visible = False

CommandButton24.Visible = False

ListBox3.ListIndex = ListBox3.ListCount - 1

End If

End If

Exit Sub

EERR:

ComboBox11.Value = ""

End Sub

 

Private Sub ComboBox11_Enter()

On Error GoTo EERR

Dim AAPP As Long

Dim AAAZ As Long

ComboBox11.BackColor = &HC0E0FF

ComboBox12.BackColor = &HFFFFFF

ComboBox13.BackColor = &HFFFFFF

TextBox1.Value = "ComboBox11"

ListBox3.BoundColumn = 13

ListBox3.ColumnCount = 13

ListBox3.BackColor = &HC0E0FF

ComboBox12.Value = ""

With ZZFFF8

ListBox3.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 15)).Address(External:=True)

End With

If ComboBox11.Value <> "" Then

ListBox3.ListIndex = ComboBox11.ListIndex

Else:

ListBox3.ListIndex = ListBox3.ListCount - 1

End If

If ComboBox11.Value <> "" Then

AAAZ = CDbl(ZZFFF8.Range("c2:c1048571").Cells.Find(What:=ComboBox11.Value, lookat:=xlWhole).Row)

AAPP = ComboBox11.ListIndex + 2

ComboBox13.Value = ZZFFF8.Cells(AAPP, 2).Value

TextBox29.Value = ZZFFF8.Cells(AAPP, 4).Value

ComboBox14.Value = ZZFFF8.Cells(AAPP, 5).Value

TextBox30.Value = ZZFFF8.Cells(AAPP, 6).Value

TextBox31.Value = ZZFFF8.Cells(AAPP, 7).Value

TextBox32.Value = ZZFFF8.Cells(AAPP, 8).Value

TextBox33.Value = ZZFFF8.Cells(AAPP, 9).Value

TextBox34.Value = ZZFFF8.Cells(AAPP, 10).Value

TextBox35.Value = ZZFFF8.Cells(AAPP, 11).Value

TextBox36.Value = ZZFFF8.Cells(AAPP, 12).Value

End If

Exit Sub

EERR:

End Sub

 

Private Sub Frame8_Enter()

On Error GoTo EERR

TextBox1.Value = "ComboBox1"

TextBox13.SetFocus

ComboBox1.SetFocus

CheckBox3 = False

CheckBox4 = False

ComboBox2.Value = ""

If ComboBox1.Value = "" Then

CommandButton18.Visible = False

Label11.Visible = False

ComboBox3.Visible = False

ComboBox3.Value = ""

ListBox1.BoundColumn = 7

ListBox1.ColumnCount = 7

ListBox1.BackColor = &HFFFFC0

With ZZFFF3

ListBox1.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 8)).Address(External:=True)

End With

If ComboBox1.Value <> "" Then

ListBox1.ListIndex = ComboBox1.ListIndex

Else:

ListBox1.ListIndex = ListBox1.ListCount - 1

End If

End If

Exit Sub

EERR:

End Sub

 

Private Sub Frame9_Enter()

On Error GoTo EERR

TextBox15.SetFocus

ComboBox2.SetFocus

TextBox1.Value = "ComboBox2"

CheckBox1 = False

CheckBox2 = False

ComboBox1.Value = ""

If ComboBox2.Value = "" Then

CommandButton18.Visible = False

Label11.Visible = False

ComboBox3.Visible = False

ComboBox3.Value = ""

ListBox1.BoundColumn = 3

ListBox1.ColumnCount = 3

ListBox1.BackColor = &HC0FFC0

With ZZFFF5

ListBox1.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 4)).Address(External:=True)

End With

If ComboBox2.Value <> "" Then

ListBox1.ListIndex = ComboBox2.ListIndex

Else:

ListBox1.ListIndex = ListBox1.ListCount - 1

End If

End If

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox32_Change()

On Error GoTo EERR

Dim MESA As String

Dim MESL As String

Dim MESP As String

Dim AAPP As Long

Dim AAPP2 As Long

Dim AAPP3 As Long

Dim AAPP4 As Long

Dim AAPP5 As Long

Dim AAAZ As Long

Dim AAAZ2 As Long

ListBox6.ListIndex = ListBox6.ListCount - 1

CommandButton36.Visible = False

ZZFFF2.[ab8] = ""

ComboBox38.BackColor = &HFFFFFF

ComboBox38.Value = ""

If ComboBox32.Value <> "" Then

CommandButton36.Visible = True

ZZFFF2.[ab8] = ComboBox32.Value

End If

If TextBox1.Value = "ComboBox32" Then

If ComboBox32.Value <> "" Then

AAAZ = CDbl(ZZFFF2.Range("a7:a1048571").Cells.Find(What:=ComboBox32.Value, lookat:=xlWhole).Row)

If ComboBox32.Value <> "" Then

ListBox6.ListIndex = AAAZ - 8

Else:

ListBox6.ListIndex = ListBox6.ListCount - 1

End If

AAAZ = CDbl(ZZFFF2.Range("ap7:ap1048571").Cells.Find(What:=ComboBox32.Value, lookat:=xlWhole).Row)

AAPP = ZZFFF2.Cells(AAAZ, 43)

AAPP2 = ZZFFF2.Cells(AAAZ, 45)

AAPP3 = ZZFFF2.Cells(AAAZ, 44).Value

AAPP4 = ZZFFF2.Cells(AAAZ, 46).Value

AAPP5 = ZZFFF2.Cells(AAAZ, 55).Value

TextBox47.Value = ZZFFF2.Cells(AAPP, 2).Value

TextBox48.Value = ZZFFF2.Cells(AAPP, 3).Value

TextBox49.Value = ZZFFF2.Cells(AAPP, 7).Value

TextBox50.Value = ZZFFF2.Cells(AAPP, 8).Value

ComboBox35.Value = ZZFFF7.Cells(AAPP2, 2).Value

ComboBox33.Value = ZZFFF3.Cells(AAPP3, 2).Value

ComboBox34.Value = ZZFFF3.Cells(AAPP3, 3).Value

ComboBox36.Value = ZZFFF5.Cells(AAPP4, 2).Value

ComboBox37.Value = ZZFFF5.Cells(AAPP5, 2).Value

MESA = ComboBox33.Value

MESL = ComboBox35.Value

MESP = ComboBox36.Value

ComboBox33.Value = ""

ComboBox35.Value = ""

ComboBox36.Value = ""

ComboBox33.Value = MESA

ComboBox35.Value = MESL

ComboBox36.Value = MESP

End If

End If

If ComboBox32.Value = "" Then

CommandButton36.Visible = False

End If

Exit Sub

EERR:

ComboBox32.Value = ""

End Sub

 

Private Sub ComboBox32_Enter()

On Error GoTo EERR

Dim AAAZ As Long

If ComboBox32.Value <> "" Then

AAAZ = CDbl(ZZFFF2.Range("a7:b1048571").Cells.Find(What:=ComboBox32.Value, lookat:=xlWhole).Row)

End If

ComboBox38.BackColor = &HFFFFFF

ComboBox38.Value = ""

ListBox6.BackColor = &HFFFFFF

TextBox1.Value = "ComboBox32"

ListBox6.BoundColumn = 11

ListBox6.ColumnCount = 11

ListBox6.BackColor = &HFFFFFF

ListBox6.ColumnWidths = "50;80;60;80;100;40;60;60;60;80;40"

With ZZFFF2

ListBox6.RowSource = .Range(.Cells(8, 1), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 11)).Address(External:=True)

End With

If ComboBox32.Value <> "" Then

ListBox6.ListIndex = AAAZ - 8

Else:

ListBox6.ListIndex = ListBox6.ListCount - 1

End If

Label191.Visible = False

ComboBox38.Visible = False

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox25_Change()

On Error GoTo EERR

Dim AAPP As Long

Dim AAPP2 As Long

Dim AAPP3 As Long

Dim AAPP4 As Long

Dim AAAZ As Long

Dim AAAZ2 As Long

ListBox5.ListIndex = ListBox5.ListCount - 1

CommandButton32.Visible = False

ZZFFF2.[ab8] = ""

ComboBox30.BackColor = &HFFFFFF

ComboBox30.Value = ""

If ComboBox25.Value <> "" Then

CommandButton32.Visible = True

ZZFFF2.[ab8] = ComboBox25.Value

End If

If TextBox1.Value = "ComboBox25" Then

If ComboBox25.Value <> "" Then

AAAZ = CDbl(ZZFFF2.Range("a7:a1048571").Cells.Find(What:=ComboBox25.Value, lookat:=xlWhole).Row)

If ComboBox25.Value <> "" Then

ListBox5.ListIndex = AAAZ - 8

Else:

ListBox5.ListIndex = ListBox5.ListCount - 1

End If

AAAZ = CDbl(ZZFFF2.Range("ac7:ac1048571").Cells.Find(What:=ComboBox25.Value, lookat:=xlWhole).Row)

AAPP = ZZFFF2.Cells(AAAZ, 30)

AAPP2 = ZZFFF2.Cells(AAAZ, 32)

AAPP3 = ZZFFF2.Cells(AAAZ, 31).Value

AAPP4 = ZZFFF2.Cells(AAAZ, 33).Value

TextBox43.Value = ZZFFF2.Cells(AAPP, 2).Value

TextBox44.Value = ZZFFF2.Cells(AAPP, 3).Value

TextBox45.Value = ZZFFF2.Cells(AAPP, 8).Value

ComboBox26.Value = ZZFFF7.Cells(AAPP2, 2).Value

ComboBox27.Value = ZZFFF3.Cells(AAPP3, 2).Value

ComboBox28.Value = ZZFFF3.Cells(AAPP3, 3).Value

ComboBox29.Value = ZZFFF5.Cells(AAPP4, 2).Value

End If

End If

If ComboBox25.Value = "" Then

CommandButton32.Visible = False

End If

Exit Sub

EERR:

ComboBox25.Value = ""

End Sub

 

Private Sub ComboBox25_Enter()

On Error GoTo EERR

Dim AAAZ As Long

If ComboBox25.Value <> "" Then

AAAZ = CDbl(ZZFFF2.Range("a7:b1048571").Cells.Find(What:=ComboBox25.Value, lookat:=xlWhole).Row)

End If

ComboBox30.BackColor = &HFFFFFF

ComboBox30.Value = ""

ListBox5.BackColor = &HFFFFFF

TextBox1.Value = "ComboBox25"

ListBox5.BoundColumn = 11

ListBox5.ColumnCount = 11

ListBox5.BackColor = &HFFFFFF

ListBox5.ColumnWidths = "50;80;60;80;100;40;60;60;60;80;40"

With ZZFFF2

ListBox5.RowSource = .Range(.Cells(8, 1), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 11)).Address(External:=True)

End With

If ComboBox25.Value <> "" Then

ListBox5.ListIndex = AAAZ - 8

Else:

ListBox5.ListIndex = ListBox5.ListCount - 1

End If

Label128.Visible = False

ComboBox30.Visible = False

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox16_Change()

On Error GoTo EERR

Dim AAPP As Long

Dim AAPP2 As Long

Dim AAPP3 As Long

Dim AAPP4 As Long

Dim AAAZ As Long

Dim AAAZ2 As Long

ListBox4.ListIndex = ListBox4.ListCount - 1

CommandButton28.Visible = False

ZZFFF2.[ab8] = ""

ComboBox23.BackColor = &HFFFFFF

ComboBox23.Value = ""

If ComboBox16.Value <> "" Then

CommandButton28.Visible = True

ZZFFF2.[ab8] = ComboBox16.Value

End If

If TextBox1.Value = "ComboBox16" Then

If ComboBox16.Value <> "" Then

AAAZ = CDbl(ZZFFF2.Range("a7:a1048571").Cells.Find(What:=ComboBox16.Value, lookat:=xlWhole).Row)

If ComboBox16.Value <> "" Then

ListBox4.ListIndex = AAAZ - 8

Else:

ListBox4.ListIndex = ListBox4.ListCount - 1

End If

AAAZ = CDbl(ZZFFF2.Range("o7:o1048571").Cells.Find(What:=ComboBox16.Value, lookat:=xlWhole).Row)

AAPP = ZZFFF2.Cells(AAAZ, 16)

AAPP2 = ZZFFF2.Cells(AAAZ, 18)

AAPP3 = ZZFFF2.Cells(AAAZ, 17).Value

AAPP4 = ZZFFF2.Cells(AAAZ, 19).Value

TextBox38.Value = ZZFFF2.Cells(AAPP, 2).Value

TextBox39.Value = ZZFFF2.Cells(AAPP, 3).Value

TextBox40.Value = ZZFFF2.Cells(AAPP, 7).Value

TextBox41.Value = ZZFFF2.Cells(AAPP, 8).Value

ComboBox17.Value = ZZFFF7.Cells(AAPP2, 2).Value

ComboBox18.Value = ZZFFF3.Cells(AAPP3, 2).Value

ComboBox19.Value = ZZFFF3.Cells(AAPP3, 3).Value

ComboBox22.Value = ZZFFF5.Cells(AAPP4, 2).Value

End If

End If

If ComboBox16.Value = "" Then

CommandButton28.Visible = False

End If

Exit Sub

EERR:

ComboBox16.Value = ""

End Sub

 

Private Sub ComboBox16_Enter()

On Error GoTo EERR

Dim AAAZ As Long

If ComboBox16.Value <> "" Then

AAAZ = CDbl(ZZFFF2.Range("a7:b1048571").Cells.Find(What:=ComboBox16.Value, lookat:=xlWhole).Row)

End If

ComboBox23.BackColor = &HFFFFFF

ComboBox23.Value = ""

ListBox4.BackColor = &HFFFFFF

TextBox1.Value = "ComboBox16"

ListBox4.BoundColumn = 11

ListBox4.ColumnCount = 11

ListBox4.BackColor = &HFFFFFF

ListBox4.ColumnWidths = "50;80;60;80;100;40;60;60;60;80;40"

With ZZFFF2

ListBox4.RowSource = .Range(.Cells(8, 1), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 11)).Address(External:=True)

End With

If ComboBox16.Value <> "" Then

ListBox4.ListIndex = AAAZ - 8

Else:

ListBox4.ListIndex = ListBox4.ListCount - 1

End If

Label66.Visible = False

ComboBox23.Visible = False

Exit Sub

EERR:

End Sub

 

Private Sub TextBox27_Change()

On Error GoTo EERR

If TextBox27.Value <> "" Then

Dim AAPP As Long

Dim AAAZ As Long

Dim AAAC As Long

AAAZ = CDbl(ZZFFF8.Range("b2:b1048571").Cells.Find(What:=ComboBox13.Value, lookat:=xlWhole).Row)

AAPP = ComboBox13.ListIndex + 2

TextBox2.Value = ""

TextBox2.Value = ComboBox13.Value

ZZFFF8.Activate

ZZFFF8.Range(Cells(AAPP, 2), Cells(AAPP, 10472)).Value = ""

ZZFFF1.Activate

MsgBox "Kundenkonto " & TextBox2.Value & " ist gelöscht!", 48, "http://excel.hpage.de    "

With ZZFFF8

ComboBox13.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 2)).Address(External:=True)

ComboBox11.RowSource = .Range(.Cells(2, 3), .Cells(.Cells(Rows.Count, 3).End(xlUp).Row, 3)).Address(External:=True)

ComboBox12.RowSource = .Range(.Cells(2, 6), .Cells(.Cells(Rows.Count, 6).End(xlUp).Row, 6)).Address(External:=True)

End With

With ZZFFF8

ListBox3.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 13)).Address(External:=True)

End With

If ComboBox13.Value <> "" Then

ListBox3.ListIndex = ComboBox13.ListIndex

Else:

ListBox3.ListIndex = ListBox3.ListCount - 1

End If

TextBox27.Value = ""

End If

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton26_Click()

On Error Resume Next

ZZFFF11.Activate

ActiveSheet.Rows("1:1").RowHeight = 15.75

ActiveSheet.Rows("2:2").RowHeight = 15.75

Dim SEGG

For Each SEGG In ActiveSheet.Shapes

If Not Intersect(SEGG.TopLeftCell, ActiveCell) Is Nothing Then SEGG.Delete

Next SEGG

ActiveSheet.Range("a1:r100009").Value = ""

ActiveSheet.Range("c3:c3003").NumberFormat = "General"

ActiveSheet.Range("a1:r8").Font.Bold = False

ActiveSheet.DrawingObjects.Delete

Dim AAPP As Long

Dim SCHOT As Long

Dim AAAC As Long

Dim RRRR As Long

Dim AAAZ As Long

If ComboBox15.Value = "" Then

AAAZ = CDbl(ZZFFF8.Cells(Rows.Count, 2).End(xlUp).Row)

ZZFFF8.Activate

ActiveSheet.Range(Cells(1, 2), Cells(AAAZ, 14)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1] = "Kundendatenbank"

ZZFFF11.[a2].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 13

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox13.Value <> "" And ComboBox15.Value = "Kunde/Artikeln" Then

AAPP = ComboBox13.ListIndex + 2

ZZFFF11.[a1] = "Kunde/Artikeln"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF8.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF8.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 45 + ((SCHOT - 1) * 2)

If ZZFFF8.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF8.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF8.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 5) > 0 Then

ZZFFF11.Cells(RRRR, 7) = Round(ZZFFF11.Cells(RRRR, 6) / ZZFFF11.Cells(RRRR, 5), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 7

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox13.Value <> "" And ComboBox15.Value = "Kunde/Lieferanten" Then

AAPP = ComboBox13.ListIndex + 2

ZZFFF11.[a1] = "Kunde/Lieferanten"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF8.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF8.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Lieferant"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 3000

AAAC = 2567 + ((SCHOT - 1) * 2)

If ZZFFF8.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF7.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF8.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF8.Cells(AAPP, AAAC + 1)

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

Exit Sub

End Sub

 

Private Sub CommandButton21_Click()

On Error GoTo EERR

Dim ††† As Long

TextBox1.Value = "EintragenLi"

If TextBox21.Value = "" Then

MsgBox "Straße ist nicht eingetragen!", 48, "http://excel.hpage.de"

TextBox21.SetFocus

Exit Sub

End If

If ComboBox7.Value <> "" Then

††† = ComboBox7.ListIndex + 2

End If

If ComboBox7.Value = "" Then

Call ZLIPA1

††† = CLng(TextBox2.Value)

End If

If ††† > 3001 Then

MsgBox "Es sind schon 3000 Lieferantenkonten erstellt worden!", 48, "http://excel.hpage.de"

Exit Sub

End If

ZZFFF7.Cells(†††, 2).Value = CDbl(††† + 59998)

ZZFFF7.Cells(†††, 3).Value = TextBox18.Value

ZZFFF7.Cells(†††, 4).Value = TextBox19.Value

ZZFFF7.Cells(†††, 5).Value = ComboBox8.Value

ZZFFF7.Cells(†††, 6).Value = TextBox20.Value

ZZFFF7.Cells(†††, 7).Value = TextBox21.Value

ZZFFF7.Cells(†††, 8).Value = TextBox22.Value

ZZFFF7.Cells(†††, 9).Value = TextBox23.Value

ZZFFF7.Cells(†††, 10).Value = TextBox24.Value

ZZFFF7.Cells(†††, 11).Value = TextBox25.Value

ZZFFF7.Cells(†††, 12).Value = TextBox26.Value

With ZZFFF7

ListBox2.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 13)).Address(External:=True)

ComboBox5.RowSource = .Range(.Cells(2, 3), .Cells(.Cells(Rows.Count, 3).End(xlUp).Row, 3)).Address(External:=True)

ComboBox6.RowSource = .Range(.Cells(2, 6), .Cells(.Cells(Rows.Count, 6).End(xlUp).Row, 6)).Address(External:=True)

ComboBox7.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 2)).Address(External:=True)

ComboBox5.RowSource = .Range(.Cells(2, 3), .Cells(.Cells(Rows.Count, 3).End(xlUp).Row, 3)).Address(External:=True)

ComboBox6.RowSource = .Range(.Cells(2, 6), .Cells(.Cells(Rows.Count, 6).End(xlUp).Row, 6)).Address(External:=True)

End With

If ComboBox7.Value <> "" Then

ListBox2.ListIndex = ComboBox7.ListIndex

Else:

ListBox2.ListIndex = ListBox2.ListCount - 1

End If

ComboBox7.SetFocus

ComboBox7.Value = CDbl(††† + 59998)

Exit Sub

EERR:

ComboBox7.SetFocus

End Sub

 

Private Sub CommandButton25_Click()

On Error GoTo EERR

Dim ††† As Long

TextBox1.Value = "EintragenKu"

If TextBox31.Value = "" Then

MsgBox "Straße ist nicht eingetragen!", 48, "http://excel.hpage.de"

TextBox31.SetFocus

Exit Sub

End If

If ComboBox13.Value <> "" Then

††† = ComboBox13.ListIndex + 2

End If

If ComboBox13.Value = "" Then

Call ZLIPA1

††† = CLng(TextBox2.Value)

End If

If ††† > 5001 Then

MsgBox "Es sind schon 50000 Kundennkonten erstellt worden!", 48, "http://excel.hpage.de"

Exit Sub

End If

ZZFFF8.Cells(†††, 2).Value = CDbl(††† + 999998)

ZZFFF8.Cells(†††, 3).Value = TextBox28.Value

ZZFFF8.Cells(†††, 4).Value = TextBox29.Value

ZZFFF8.Cells(†††, 5).Value = ComboBox14.Value

ZZFFF8.Cells(†††, 6).Value = TextBox30.Value

ZZFFF8.Cells(†††, 7).Value = TextBox31.Value

ZZFFF8.Cells(†††, 8).Value = TextBox32.Value

ZZFFF8.Cells(†††, 9).Value = TextBox33.Value

ZZFFF8.Cells(†††, 10).Value = TextBox34.Value

ZZFFF8.Cells(†††, 11).Value = TextBox35.Value

ZZFFF8.Cells(†††, 12).Value = TextBox36.Value

With ZZFFF8

ListBox3.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 13)).Address(External:=True)

ComboBox11.RowSource = .Range(.Cells(2, 3), .Cells(.Cells(Rows.Count, 3).End(xlUp).Row, 3)).Address(External:=True)

ComboBox12.RowSource = .Range(.Cells(2, 6), .Cells(.Cells(Rows.Count, 6).End(xlUp).Row, 6)).Address(External:=True)

ComboBox13.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 2)).Address(External:=True)

ComboBox11.RowSource = .Range(.Cells(2, 3), .Cells(.Cells(Rows.Count, 3).End(xlUp).Row, 3)).Address(External:=True)

ComboBox12.RowSource = .Range(.Cells(2, 6), .Cells(.Cells(Rows.Count, 6).End(xlUp).Row, 6)).Address(External:=True)

End With

If ComboBox13.Value <> "" Then

ListBox3.ListIndex = ComboBox13.ListIndex

Else:

ListBox3.ListIndex = ListBox3.ListCount - 1

End If

ComboBox13.SetFocus

ComboBox13.Value = CDbl(††† + 999998)

Exit Sub

EERR:

ComboBox13.SetFocus

End Sub

 

Private Sub ComboBox42_Change()

On Error GoTo EERR

Dim AAPP As Long

Call ZLIPA2

If TextBox1.Value = "ComboBox42" Then

If ComboBox42.Value <> "" Then

AAPP = CDbl(ZZFFF8.Range("b2:b50001").Cells.Find(What:=ComboBox42.Value, lookat:=xlWhole).Row)

ListBox7.ListIndex = ComboBox42.ListIndex

Else:

ListBox7.ListIndex = ListBox7.ListCount - 1

End If

Label254.Visible = True

ComboBox47.Visible = True

ComboBox47.BackColor = &HC0E0FF

ComboBox47.Clear

With ComboBox47

.AddItem "Kunde/Artikeln"

.AddItem "Kunde/Lieferanten"

End With

End If

Exit Sub

EERR:

ComboBox42.Value = ""

End Sub

 

Private Sub ComboBox42_Enter()

On Error GoTo EERR

TextBox1.Value = "ComboBox42"

ListBox7.BoundColumn = 13

ListBox7.ColumnCount = 13

ListBox7.BackColor = &HC0E0FF

Label254.Visible = True

ComboBox47.Visible = True

ComboBox47.BackColor = &HC0E0FF

With ZZFFF8

ListBox7.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 15)).Address(External:=True)

End With

If ComboBox42.Value <> "" Then

ListBox7.ListIndex = ComboBox42.ListIndex

Else:

ListBox7.ListIndex = ListBox7.ListCount - 1

End If

ComboBox47.Clear

With ComboBox47

.AddItem "Kunde/Artikeln"

.AddItem "Kunde/Lieferanten"

End With

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox35_Change()

On Error GoTo EERR

Dim AAPP As Long

Dim AAPP2 As Long

Dim AAPP3 As Long

Dim AAAC As Long

Dim AAAZ As Long

Dim SCHOT As Long

ComboBox36.Clear

If ComboBox35.Value <> "" Then

AAPP = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox35.Value, lookat:=xlWhole).Row)

If ComboBox33.Value <> "" Then

AAPP2 = ComboBox33.ListIndex + 2

Else:

Exit Sub

End If

AAPP3 = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox35.Value, lookat:=xlWhole).Row) - 2

AAAZ = ZZFFF3.Cells(AAPP2, 16383) + AAPP3

AAAC = ZZFFF3.Cells(AAPP2, 16384)

For SCHOT = 2 To 2048

If ZZFFF3.Cells(AAAZ, AAAC + (2 * (SCHOT - 2))) > 0 Then

With ComboBox36

.AddItem ZZFFF5.Cells(SCHOT, 2).Value

End With

End If

Next SCHOT

End If

Call ZLIPA2

If TextBox1.Value = "ComboBox35" Then

If ComboBox35.Value <> "" Then

ListBox6.ListIndex = AAPP - 2

Else:

ListBox6.ListIndex = ListBox6.ListCount - 1

End If

If ComboBox35.Value <> "" Then

Label191.Visible = True

ComboBox38.Visible = True

ComboBox38.Clear

With ComboBox38

.AddItem "Bestand/Artikeln"

.AddItem "Zugang/Artikeln"

.AddItem "Entnahme/Artikeln"

.AddItem "Lieferant/Lagerplätze"

.AddItem "Lieferant/Artikel/Lagerplätze"

End With

End If

End If

Exit Sub

EERR:

ComboBox35.Value = ""

End Sub

 

Private Sub ComboBox35_Enter()

On Error GoTo EERR

Dim AAAZ As Long

TextBox1.Value = "ComboBox35"

ListBox6.ColumnWidths = ""

ListBox6.BoundColumn = 13

ListBox6.ColumnCount = 13

ListBox6.BackColor = &HFFFF&

With ZZFFF7

If ComboBox35.Value <> "" Then

AAAZ = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox35.Value, lookat:=xlWhole).Row)

End If

ListBox6.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 15)).Address(External:=True)

End With

If ComboBox35.Value <> "" Then

ListBox6.ListIndex = AAAZ - 2

Else:

ListBox6.ListIndex = ListBox6.ListCount - 1

End If

Label191.Visible = True

ComboBox38.Visible = True

ComboBox38.BackColor = &HFFFF&

ComboBox38.Clear

With ComboBox38

.AddItem "Bestand/Artikeln"

.AddItem "Zugang/Artikeln"

.AddItem "Entnahme/Artikeln"

.AddItem "Lieferant/Lagerplätze"

.AddItem "Lieferant/Artikel/Lagerplätze"

End With

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox7_Change()

On Error GoTo EERR

Label28.Visible = False

ComboBox10.Visible = False

Dim AAPP As Long

Dim AAAZ As Long

CommandButton20.Visible = False

ZZFFF2.[ab8] = ""

If ComboBox7.Value <> "" Then

CommandButton20.Visible = True

ZZFFF2.[ab8] = ComboBox7.Value

End If

If TextBox1.Value = "ComboBox7" Then

If ComboBox7.Value <> "" Then

AAAZ = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox7.Value, lookat:=xlWhole).Row)

AAPP = ComboBox7.ListIndex + 2

TextBox18.Value = ZZFFF7.Cells(AAPP, 3).Value

TextBox19.Value = ZZFFF7.Cells(AAPP, 4).Value

ComboBox8.Value = ZZFFF7.Cells(AAPP, 5).Value

TextBox20.Value = ZZFFF7.Cells(AAPP, 6).Value

TextBox21.Value = ZZFFF7.Cells(AAPP, 7).Value

TextBox22.Value = ZZFFF7.Cells(AAPP, 8).Value

TextBox23.Value = ZZFFF7.Cells(AAPP, 9).Value

TextBox24.Value = ZZFFF7.Cells(AAPP, 10).Value

TextBox25.Value = ZZFFF7.Cells(AAPP, 11).Value

TextBox26.Value = ZZFFF7.Cells(AAPP, 12).Value

Label27.Visible = True

ComboBox9.Visible = True

CommandButton20.Visible = True

ComboBox9.Clear

With ComboBox9

.AddItem "Bestand/Artikeln"

.AddItem "Zugang/Artikeln"

.AddItem "Entnahme/Artikeln"

.AddItem "Lieferant/Lagerplätze"

.AddItem "Lieferant/Artikel/Lagerplätze"

End With

If ComboBox7.Value <> "" Then

ListBox2.ListIndex = ComboBox7.ListIndex

Else:

ListBox2.ListIndex = ListBox2.ListCount - 1

End If

Else:

TextBox18.Value = ""

TextBox19.Value = ""

ComboBox8.Value = ""

TextBox20.Value = ""

TextBox21.Value = ""

TextBox22.Value = ""

TextBox23.Value = ""

TextBox24.Value = ""

TextBox25.Value = ""

TextBox26.Value = ""

Label27.Visible = False

ComboBox9.Visible = False

ListBox2.ListIndex = ListBox2.ListCount - 1

End If

End If

Exit Sub

EERR:

ComboBox7.Value = ""

End Sub

 

Private Sub ComboBox7_Enter()

On Error GoTo EERR

Dim AAAZ As Long

Dim AAPP As Long

TextBox1.Value = "ComboBox7"

ComboBox6.BackColor = &HFFFFFF

ComboBox5.BackColor = &HFFFFFF

ComboBox7.BackColor = &HFFFF&

ListBox2.BoundColumn = 13

ListBox2.ColumnCount = 13

ListBox2.BackColor = &HFFFF&

ComboBox5.Value = ""

ComboBox6.Value = ""

With ZZFFF7

ListBox2.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 15)).Address(External:=True)

End With

If ComboBox7.Value <> "" Then

ListBox2.ListIndex = ComboBox7.ListIndex

Else:

ListBox2.ListIndex = ListBox2.ListCount - 1

End If

If ComboBox7.Value <> "" Then

AAAZ = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox7.Value, lookat:=xlWhole).Row)

AAPP = ComboBox7.ListIndex + 2

TextBox18.Value = ZZFFF7.Cells(AAPP, 3).Value

TextBox19.Value = ZZFFF7.Cells(AAPP, 4).Value

ComboBox8.Value = ZZFFF7.Cells(AAPP, 5).Value

TextBox20.Value = ZZFFF7.Cells(AAPP, 6).Value

TextBox21.Value = ZZFFF7.Cells(AAPP, 7).Value

TextBox22.Value = ZZFFF7.Cells(AAPP, 8).Value

TextBox23.Value = ZZFFF7.Cells(AAPP, 9).Value

TextBox24.Value = ZZFFF7.Cells(AAPP, 10).Value

TextBox25.Value = ZZFFF7.Cells(AAPP, 11).Value

TextBox26.Value = ZZFFF7.Cells(AAPP, 12).Value

End If

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox45_Change()

On Error GoTo EERR

Dim AAPP As Long

Dim AAPP2 As Long

Dim AAPP3 As Long

Dim AAAC As Long

Dim ††† As Long

Dim SCHOT As Long

If ComboBox43.Value <> "" Then

If ComboBox45.Value <> "" Then

AAPP = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox45.Value, lookat:=xlWhole).Row)

AAPP2 = ComboBox43.ListIndex + 2

ComboBox46.Clear

AAPP3 = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox45.Value, lookat:=xlWhole).Row) - 2

††† = ZZFFF3.Cells(AAPP2, 16383) + AAPP3

AAAC = ZZFFF3.Cells(AAPP2, 16384)

For SCHOT = 2 To 2048

If ZZFFF3.Cells(†††, AAAC + (2 * (SCHOT - 2))) > 0 Then

With ComboBox46

.AddItem ZZFFF5.Cells(SCHOT, 2).Value

End With

End If

Next SCHOT

End If

End If

Call ZLIPA2

If TextBox1.Value = "ComboBox45" Then

If ComboBox45.Value <> "" Then

ComboBox46.Value = ""

ListBox7.ListIndex = AAPP - 2

Else:

ListBox7.ListIndex = ListBox7.ListCount - 1

End If

If ComboBox45.Value <> "" Then

Label254.Visible = True

ComboBox47.Visible = True

ComboBox47.Clear

With ComboBox47

.AddItem "Bestand/Artikeln"

.AddItem "Zugang/Artikeln"

.AddItem "Entnahme/Artikeln"

.AddItem "Lieferant/Lagerplätze"

.AddItem "Lieferant/Artikel/Lagerplätze"

End With

End If

End If

Exit Sub

EERR:

ComboBox45.Value = ""

End Sub

 

Private Sub ComboBox45_Enter()

On Error GoTo EERR

Dim AAAZ As Long

TextBox1.Value = "ComboBox45"

ListBox7.ColumnWidths = ""

ListBox7.BoundColumn = 13

ListBox7.ColumnCount = 13

ListBox7.BackColor = &HFFFF&

With ZZFFF7

If ComboBox45.Value <> "" Then

AAAZ = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox45.Value, lookat:=xlWhole).Row)

End If

ListBox7.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 15)).Address(External:=True)

End With

If ComboBox45.Value <> "" Then

ListBox7.ListIndex = AAAZ - 2

Else:

ListBox7.ListIndex = ListBox7.ListCount - 1

End If

Label254.Visible = True

ComboBox47.Visible = True

ComboBox47.BackColor = &HFFFF&

ComboBox47.Clear

With ComboBox47

.AddItem "Bestand/Artikeln"

.AddItem "Zugang/Artikeln"

.AddItem "Entnahme/Artikeln"

.AddItem "Lieferant/Lagerplätze"

.AddItem "Lieferant/Artikel/Lagerplätze"

End With

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox26_Change()

On Error GoTo EERR

Dim AAAZ As Long

Dim AAPP As Long

Dim AAAC As Long

Dim SCHOT As Long

ComboBox27.Clear

ComboBox28.Clear

ComboBox29.Clear

If ComboBox26.Value <> "" Then

AAAZ = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox26.Value, lookat:=xlWhole).Row)

AAPP = ComboBox26.ListIndex + 2

For SCHOT = 1 To 1260

AAAC = 45 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

With ComboBox27

.AddItem ZZFFF3.Cells(SCHOT + 1, 2).Value

End With

With ComboBox28

.AddItem ZZFFF3.Cells(SCHOT + 1, 3).Value

End With

End If

Next SCHOT

End If

Call ZLIPA2

If TextBox1.Value = "ComboBox26" Then

If ComboBox26.Value <> "" Then

ListBox5.ListIndex = ComboBox26.ListIndex

Else:

ListBox5.ListIndex = ListBox5.ListCount - 1

End If

If ComboBox26.Value <> "" Then

Label128.Visible = True

ComboBox30.Visible = True

ComboBox30.Clear

With ComboBox30

.AddItem "Bestand/Artikeln"

.AddItem "Zugang/Artikeln"

.AddItem "Entnahme/Artikeln"

.AddItem "Lieferant/Lagerplätze"

.AddItem "Lieferant/Artikel/Lagerplätze"

End With

End If

End If

Exit Sub

EERR:

ComboBox26.Value = ""

End Sub

 

Private Sub ComboBox26_Enter()

On Error GoTo EERR

TextBox1.Value = "ComboBox26"

ListBox5.ColumnWidths = ""

ListBox5.BoundColumn = 13

ListBox5.ColumnCount = 13

ListBox5.BackColor = &HFFFF&

With ZZFFF7

ListBox5.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 15)).Address(External:=True)

End With

If ComboBox26.Value <> "" Then

ListBox5.ListIndex = ComboBox26.ListIndex

Else:

ListBox5.ListIndex = ListBox5.ListCount - 1

End If

Label128.Visible = True

ComboBox30.Visible = True

ComboBox30.BackColor = &HFFFF&

ComboBox30.Clear

With ComboBox30

.AddItem "Bestand/Artikeln"

.AddItem "Zugang/Artikeln"

.AddItem "Entnahme/Artikeln"

.AddItem "Lieferant/Lagerplätze"

.AddItem "Lieferant/Artikel/Lagerplätze"

End With

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox13_Change()

On Error GoTo EERR

Dim AAPP As Long

Dim AAAZ As Long

CommandButton24.Visible = False

ZZFFF2.[ab8] = ""

If ComboBox13.Value <> "" Then

CommandButton24.Visible = True

ZZFFF2.[ab8] = ComboBox13.Value

End If

If TextBox1.Value = "ComboBox13" Then

If ComboBox13.Value <> "" Then

AAAZ = CDbl(ZZFFF8.Range("b2:b50001").Cells.Find(What:=ComboBox13.Value, lookat:=xlWhole).Row)

AAPP = ComboBox13.ListIndex + 2

TextBox28.Value = ZZFFF8.Cells(AAPP, 3).Value

TextBox29.Value = ZZFFF8.Cells(AAPP, 4).Value

ComboBox14.Value = ZZFFF8.Cells(AAPP, 5).Value

TextBox30.Value = ZZFFF8.Cells(AAPP, 6).Value

TextBox31.Value = ZZFFF8.Cells(AAPP, 7).Value

TextBox32.Value = ZZFFF8.Cells(AAPP, 8).Value

TextBox33.Value = ZZFFF8.Cells(AAPP, 9).Value

TextBox34.Value = ZZFFF8.Cells(AAPP, 10).Value

TextBox35.Value = ZZFFF8.Cells(AAPP, 11).Value

TextBox36.Value = ZZFFF8.Cells(AAPP, 12).Value

Label43.Visible = True

ComboBox15.Visible = True

If ComboBox13.Value <> "" Then

ListBox3.ListIndex = ComboBox13.ListIndex

Else:

ListBox3.ListIndex = ListBox3.ListCount - 1

End If

Else:

TextBox28.Value = ""

TextBox29.Value = ""

ComboBox14.Value = ""

TextBox30.Value = ""

TextBox31.Value = ""

TextBox32.Value = ""

TextBox33.Value = ""

TextBox34.Value = ""

TextBox35.Value = ""

TextBox36.Value = ""

Label43.Visible = False

ComboBox15.Visible = False

ListBox3.ListIndex = ListBox3.ListCount - 1

End If

End If

Exit Sub

EERR:

ComboBox13.Value = ""

End Sub

 

Private Sub ComboBox13_Enter()

On Error GoTo EERR

Dim AAPP As Long

Dim AAAZ As Long

TextBox1.Value = "ComboBox13"

ComboBox12.BackColor = &HFFFFFF

ComboBox11.BackColor = &HFFFFFF

ComboBox13.BackColor = &HC0E0FF

ListBox3.BoundColumn = 13

ListBox3.ColumnCount = 13

ListBox3.BackColor = &HC0E0FF

ComboBox11.Value = ""

ComboBox12.Value = ""

With ZZFFF8

ListBox3.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 15)).Address(External:=True)

End With

If ComboBox13.Value <> "" Then

ListBox3.ListIndex = ComboBox13.ListIndex

Else:

ListBox3.ListIndex = ListBox3.ListCount - 1

End If

If ComboBox13.Value <> "" Then

AAAZ = CDbl(ZZFFF8.Range("b2:b1048571").Cells.Find(What:=ComboBox13.Value, lookat:=xlWhole).Row)

AAPP = ComboBox13.ListIndex + 2

TextBox28.Value = ZZFFF8.Cells(AAPP, 3).Value

TextBox29.Value = ZZFFF8.Cells(AAPP, 4).Value

ComboBox14.Value = ZZFFF8.Cells(AAPP, 5).Value

TextBox30.Value = ZZFFF8.Cells(AAPP, 6).Value

TextBox31.Value = ZZFFF8.Cells(AAPP, 7).Value

TextBox32.Value = ZZFFF8.Cells(AAPP, 8).Value

TextBox33.Value = ZZFFF8.Cells(AAPP, 9).Value

TextBox34.Value = ZZFFF8.Cells(AAPP, 10).Value

TextBox35.Value = ZZFFF8.Cells(AAPP, 11).Value

TextBox36.Value = ZZFFF8.Cells(AAPP, 12).Value

End If

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox17_Change()

On Error GoTo EERR

Dim AAAZ As Long

ComboBox20.Clear

If ComboBox17.Value <> "" Then

AAAZ = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox17.Value, lookat:=xlWhole).Row)

End If

Call ZLIPA2

If TextBox1.Value = "ComboBox17" Then

ListBox4.ColumnWidths = ""

If ComboBox17.Value <> "" Then

ListBox4.ListIndex = ComboBox17.ListIndex

Else:

ListBox4.ListIndex = ListBox4.ListCount - 1

End If

If ComboBox17.Value <> "" Then

Label66.Visible = True

ComboBox23.Visible = True

ComboBox23.Clear

With ComboBox23

.AddItem "Bestand/Artikeln"

.AddItem "Zugang/Artikeln"

.AddItem "Entnahme/Artikeln"

.AddItem "Lieferant/Lagerplätze"

.AddItem "Lieferant/Artikel/Lagerplätze"

End With

End If

End If

Exit Sub

EERR:

ComboBox17.Value = ""

End Sub

 

Private Sub ComboBox17_Enter()

On Error GoTo EERR

TextBox1.Value = "ComboBox17"

ListBox4.ColumnWidths = ""

ListBox4.BoundColumn = 13

ListBox4.ColumnCount = 13

ListBox4.BackColor = &HFFFF&

With ZZFFF7

ListBox4.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 15)).Address(External:=True)

End With

If ComboBox17.Value <> "" Then

ListBox4.ListIndex = ComboBox17.ListIndex

Else:

ListBox4.ListIndex = ListBox4.ListCount - 1

End If

Label66.Visible = True

ComboBox23.Visible = True

ComboBox23.BackColor = &HFFFF&

ComboBox23.Clear

With ComboBox23

.AddItem "Bestand/Artikeln"

.AddItem "Zugang/Artikeln"

.AddItem "Entnahme/Artikeln"

.AddItem "Lieferant/Lagerplätze"

.AddItem "Lieferant/Artikel/Lagerplätze"

End With

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox20_Change()

On Error GoTo EERR

Dim AAPP As Long

Dim AAAC As Long

Dim AAAZ As Long

Label86.Caption = ""

Label87.Caption = ""

Label88.Caption = ""

If ComboBox20.Value <> "" Then

AAAZ = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox20.Value, lookat:=xlWhole).Row)

AAPP = ComboBox17.ListIndex + 2

AAAC = 2567 + ((AAAZ - 2) * 2)

Label86.Caption = ZZFFF7.Cells(AAPP, AAAC)

Label87.Caption = ZZFFF7.Cells(AAPP, AAAC + 1)

If ZZFFF7.Cells(AAPP, AAAC) <> "" And ZZFFF7.Cells(AAPP, AAAC) <> 0 Then

Label88.Caption = Round(ZZFFF7.Cells(AAPP, AAAC + 1) / ZZFFF7.Cells(AAPP, AAAC), 2)

End If

If TextBox1.Value = "ComboBox20" Then

ComboBox22.Value = ComboBox20.Value

End If

If Label87.Caption = "" Then

ComboBox20.Value = ""

End If

End If

Exit Sub

EERR:

ComboBox20.Value = ""

End Sub

 

Private Sub ComboBox20_Enter()

On Error GoTo EERR

TextBox1.Value = "ComboBox20"

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton14_Click()

On Error GoTo EERR

ZZFFF2.[n14] = "LKE"

CommandButton14.Visible = False

UserForm2.Show

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox2_Change()

On Error GoTo EERR

Dim AAPP As Long

Dim AAAZ As Long

ListBox1.BoundColumn = 3

ListBox1.ColumnCount = 3

CommandButton14.Visible = False

CommandButton14.Visible = False

ZZFFF2.[ab8] = ""

If ComboBox2.Value <> "" Then

CommandButton14.Visible = True

ZZFFF2.[ab8] = ComboBox2.Value

End If

ListBox1.ListIndex = ListBox1.ListCount - 1

If TextBox1.Value = "ComboBox2" Then

CommandButton18.Visible = False

Label11.Visible = False

ComboBox3.Visible = False

If ComboBox2.Value <> "" Then

CommandButton14.Visible = True

CommandButton18.Visible = True

Label11.Visible = True

ComboBox3.Visible = True

ComboBox3.BackColor = &HC0FFC0

ComboBox3.Clear

With ComboBox3

.AddItem "Lagerplatzkonto"

.AddItem "Lagerplatz/Artikeln"

.AddItem "Lagerplatz/Lieferanten"

End With

ComboBox1.Value = ""

AAAZ = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox2.Value, lookat:=xlWhole).Row)

AAPP = ComboBox2.ListIndex + 2

ListBox1.BackColor = &HC0FFC0

With ZZFFF5

ListBox1.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 4)).Address(External:=True)

End With

If ComboBox2.Value <> "" Then

ListBox1.ListIndex = ComboBox2.ListIndex

Else:

ListBox1.ListIndex = ListBox1.ListCount - 1

End If

End If

End If

Exit Sub

EERR:

ComboBox2.Value = ""

End Sub

 

Private Sub ComboBox2_Enter()

On Error GoTo EERR

ListBox1.BoundColumn = 3

ListBox1.ColumnCount = 3

ListBox1.BackColor = &HC0FFC0

With ZZFFF5

ListBox1.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 4)).Address(External:=True)

End With

If ComboBox2.Value <> "" Then

ListBox1.ListIndex = ComboBox2.ListIndex

Else:

ListBox1.ListIndex = ListBox1.ListCount - 1

End If

Exit Sub

EERR:

End Sub

 

Private Sub TextBox15_Exit(ByVal Cancel As MSForms.ReturnBoolean)

On Error GoTo EERR

Dim AAAZ As Long

If CheckBox3 = True Then

If TextBox15.Value <> "" Then

AAAZ = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=TextBox15.Value, lookat:=xlWhole).Row)

MsgBox "Solcher Lagerplatz existiert schon!", 48, "http://excel.hpage.de   "

TextBox15.Value = ""

TextBox15.SetFocus

End If

End If

If CheckBox4 = True Then

If TextBox15.Value <> "" Then

If ComboBox2.Value <> "" Then

If TextBox15.Value <> ComboBox2.Value Then

AAAZ = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=TextBox15.Value, lookat:=xlWhole).Row)

MsgBox "Solcher Lagerplatz existiert schon!", 48, "http://excel.hpage.de   "

TextBox15.Value = ""

ComboBox2.SetFocus

End If

End If

End If

End If

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox46_Change()

On Error GoTo EERR

Dim AAAZ As Long

Label282.Caption = ""

Label284.Caption = ""

If ComboBox46.Value <> "" Then

AAAZ = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox46.Value, lookat:=xlWhole).Row)

End If

Call ZLIPA2

If TextBox1.Value = "ComboBox46" Then

If ComboBox46.Value <> "" Then

ListBox7.ListIndex = AAAZ - 2

Else:

ListBox7.ListIndex = ListBox7.ListCount - 1

End If

Label254.Visible = True

ComboBox47.Visible = True

ComboBox47.Clear

With ComboBox47

.AddItem "Lagerplatzkonto"

.AddItem "Lagerplatz/Artikeln"

.AddItem "Lagerplatz/Lieferanten"

End With

End If

Exit Sub

EERR:

ComboBox46.Value = ""

End Sub

 

Private Sub ComboBox46_Enter()

On Error GoTo EERR

Dim AAAZ As Long

TextBox1.Value = "ComboBox46"

ListBox7.ColumnWidths = ""

ListBox7.BoundColumn = 3

ListBox7.ColumnCount = 3

ListBox7.BackColor = &HC0FFC0

If ComboBox46.Value <> "" Then

AAAZ = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox46.Value, lookat:=xlWhole).Row)

End If

With ZZFFF5

ListBox7.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 4)).Address(External:=True)

End With

If ComboBox46.Value <> "" Then

ListBox7.ListIndex = AAAZ - 2

Else:

ListBox7.ListIndex = ListBox7.ListCount - 1

End If

Label254.Visible = True

ComboBox47.Visible = True

ComboBox47.BackColor = &HC0FFC0

ComboBox47.Clear

With ComboBox47

.AddItem "Lagerplatzkonto"

.AddItem "Lagerplatz/Artikeln"

.AddItem "Lagerplatz/Lieferanten"

End With

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox29_Change()

On Error GoTo EERR

Dim AAAZ As Long

Label148.Caption = ""

Label150.Caption = ""

If ComboBox29.Value <> "" Then

AAAZ = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox29.Value, lookat:=xlWhole).Row)

End If

Call ZLIPA2

If TextBox1.Value = "ComboBox29" Then

ListBox5.ColumnWidths = ""

If ComboBox29.Value <> "" Then

ListBox5.ListIndex = AAAZ - 2

Else:

ListBox5.ListIndex = ListBox5.ListCount - 1

End If

Label128.Visible = True

ComboBox30.Visible = True

ComboBox30.Clear

With ComboBox30

.AddItem "Lagerplatzkonto"

.AddItem "Lagerplatz/Artikeln"

.AddItem "Lagerplatz/Lieferanten"

End With

End If

Exit Sub

EERR:

ComboBox29.Value = ""

End Sub

 

Private Sub ComboBox29_Enter()

On Error GoTo EERR

Dim AAAZ As Long

TextBox1.Value = "ComboBox29"

ListBox5.ColumnWidths = ""

ListBox5.BoundColumn = 3

ListBox5.ColumnCount = 3

ListBox5.BackColor = &HC0FFC0

If ComboBox29.Value <> "" Then

AAAZ = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox29.Value, lookat:=xlWhole).Row)

End If

With ZZFFF5

ListBox5.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 4)).Address(External:=True)

End With

If ComboBox29.Value <> "" Then

ListBox5.ListIndex = AAAZ - 2

Else:

ListBox5.ListIndex = ListBox5.ListCount - 1

End If

Label128.Visible = True

ComboBox30.Visible = True

ComboBox30.BackColor = &HC0FFC0

ComboBox30.Clear

With ComboBox30

.AddItem "Lagerplatzkonto"

.AddItem "Lagerplatz/Artikeln"

.AddItem "Lagerplatz/Lieferanten"

End With

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox22_Change()

On Error GoTo EERR

Dim AAAZ As Long

Label92.Caption = ""

Label94.Caption = ""

If ComboBox22.Value <> "" Then

AAAZ = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox22.Value, lookat:=xlWhole).Row)

End If

Call ZLIPA2

If TextBox1.Value = "ComboBox22" Then

ListBox4.ColumnWidths = ""

If ComboBox22.Value <> "" Then

ListBox4.ListIndex = ComboBox22.ListIndex

Else:

ListBox4.ListIndex = ListBox4.ListCount - 1

End If

Label66.Visible = True

ComboBox23.Visible = True

ComboBox23.Clear

With ComboBox23

.AddItem "Lagerplatzkonto"

.AddItem "Lagerplatz/Artikeln"

.AddItem "Lagerplatz/Lieferanten"

End With

End If

Exit Sub

EERR:

ComboBox22.Value = ""

End Sub

 

Private Sub ComboBox22_Enter()

On Error GoTo EERR

TextBox1.Value = "ComboBox22"

ListBox4.ColumnWidths = ""

ListBox4.BoundColumn = 3

ListBox4.ColumnCount = 3

ListBox4.BackColor = &HC0FFC0

With ZZFFF5

ListBox4.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 4)).Address(External:=True)

End With

If ComboBox22.Value <> "" Then

ListBox4.ListIndex = ComboBox22.ListIndex

Else:

ListBox4.ListIndex = ListBox4.ListCount - 1

End If

Label66.Visible = True

ComboBox23.Visible = True

ComboBox23.BackColor = &HC0FFC0

ComboBox23.Clear

With ComboBox23

.AddItem "Lagerplatzkonto"

.AddItem "Lagerplatz/Artikeln"

.AddItem "Lagerplatz/Lieferanten"

End With

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox9_Change()

On Error GoTo EERR

Dim AAAC As Long

Dim AAPP As Long

Dim SCHOT As Long

Label28.Visible = False

ComboBox10.Visible = False

ComboBox10.Value = ""

If ComboBox9.Value = "Lieferant/Artikel/Lagerplätze" Then

Label28.Visible = True

ComboBox10.Visible = True

If ComboBox7.Value <> "" Then

AAPP = ComboBox7.ListIndex + 2

ComboBox10.Clear

For SCHOT = 1 To 1260

AAAC = 45 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

With ComboBox10

.AddItem ZZFFF3.Cells(SCHOT + 1, 2).Value

End With

End If

Next SCHOT

End If

End If

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox38_Change()

On Error GoTo EERR

Dim AAPP As Long

Dim SCHOT As Long

Dim AAAC As Long

Label192.Visible = False

ComboBox39.Visible = False

ComboBox39.Value = ""

If ComboBox38.Value = "Artikel/Lieferant/Lagerplätze" Then

Label192.Visible = True

Label192.Caption = "Lief.-Nr."

ComboBox39.Visible = True

ComboBox39.BackColor = &HFFFF&

If ComboBox33.Value <> "" Then

AAPP = (CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox33.Value, lookat:=xlWhole).Row) - 2) * 2 + 45

ComboBox39.Clear

For SCHOT = 2 To 3001

If ZZFFF7.Cells(SCHOT, AAPP) <> "" Then

With ComboBox39

.AddItem ZZFFF7.Cells(SCHOT, 2).Value

End With

End If

Next SCHOT

End If

End If

If ComboBox38.Value = "Lieferant/Artikel/Lagerplätze" Then

Label192.Visible = True

Label192.Caption = "Artikel-Nr."

ComboBox39.Visible = True

ComboBox39.BackColor = &HFFFFC0

If ComboBox35.Value <> "" Then

AAPP = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox35.Value, lookat:=xlWhole).Row)

ComboBox39.Clear

For SCHOT = 1 To 1260

AAAC = 45 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

With ComboBox39

.AddItem ZZFFF3.Cells(SCHOT + 1, 2).Value

End With

End If

Next SCHOT

End If

End If

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox47_Change()

On Error GoTo EERR

Dim AAAC As Long

Dim AAPP As Long

Dim SCHOT As Long

Dim AACC As Long

Label255.Visible = False

ComboBox48.Visible = False

ComboBox48.Value = ""

If ComboBox47.Value = "Artikel/Lieferant/Lagerplätze" Then

Label255.Visible = True

Label255.Caption = "Lief.-Nr."

ComboBox48.Visible = True

ComboBox48.BackColor = &HFFFF&

If ComboBox43.Value <> "" Then

AAPP = ComboBox43.ListIndex * 2 + 45

ComboBox48.Clear

For SCHOT = 2 To 3001

If ZZFFF7.Cells(SCHOT, AAPP) <> "" Then

With ComboBox48

.AddItem ZZFFF7.Cells(SCHOT, 2).Value

End With

End If

Next SCHOT

End If

End If

If ComboBox47.Value = "Lieferant/Artikel/Lagerplätze" Then

Label255.Visible = True

Label255.Caption = "Artikel-Nr."

ComboBox48.Visible = True

ComboBox48.BackColor = &HFFFFC0

If ComboBox45.Value <> "" Then

AAPP = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox45.Value, lookat:=xlWhole).Row)

ComboBox48.Clear

For SCHOT = 1 To 1260

AAAC = 45 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

With ComboBox48

.AddItem ZZFFF3.Cells(SCHOT + 1, 2).Value

End With

End If

Next SCHOT

End If

End If

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox30_Change()

On Error GoTo EERR

Dim AAPP As Long

Dim SCHOT As Long

Dim AAAC As Long

Label129.Visible = False

ComboBox31.Visible = False

ComboBox31.Value = ""

If ComboBox30.Value = "Artikel/Lieferant/Lagerplätze" Then

Label129.Visible = True

Label129.Caption = "Lief.-Nr."

ComboBox31.Visible = True

ComboBox31.BackColor = &HFFFF&

If ComboBox27.Value <> "" Then

AAPP = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox27.Value, lookat:=xlWhole).Row)

AAPP = (AAPP - 2) * 2 + 45

ComboBox31.Clear

For SCHOT = 2 To 3001

If ZZFFF7.Cells(SCHOT, AAPP) <> "" Then

With ComboBox31

.AddItem ZZFFF7.Cells(SCHOT, 2).Value

End With

End If

Next SCHOT

End If

End If

If ComboBox30.Value = "Lieferant/Artikel/Lagerplätze" Then

Label129.Visible = True

Label129.Caption = "Artikel-Nr."

ComboBox31.Visible = True

ComboBox31.BackColor = &HFFFFC0

If ComboBox26.Value <> "" Then

AAPP = ComboBox26.ListIndex + 2

ComboBox31.Clear

For SCHOT = 1 To 1260

AAAC = 45 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

With ComboBox31

.AddItem ZZFFF3.Cells(SCHOT + 1, 2).Value

End With

End If

Next SCHOT

End If

End If

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox23_Change()

On Error GoTo EERR

Dim AAAC As Long

Dim AAPP As Long

Dim SCHOT As Long

Dim AACC As Long

Label67.Visible = False

ComboBox24.Visible = False

ComboBox24.Value = ""

If ComboBox23.Value = "Artikel/Lieferant/Lagerplätze" Then

Label67.Visible = True

Label67.Caption = "Lief.-Nr."

ComboBox24.Visible = True

ComboBox24.BackColor = &HFFFF&

If ComboBox18.Value <> "" Then

AAPP = ComboBox18.ListIndex * 2 + 45

ComboBox24.Clear

For SCHOT = 2 To 3001

If ZZFFF7.Cells(SCHOT, AAPP) <> "" Then

With ComboBox24

.AddItem ZZFFF7.Cells(SCHOT, 2).Value

End With

End If

Next SCHOT

End If

End If

If ComboBox23.Value = "Lieferant/Artikel/Lagerplätze" Then

Label67.Visible = True

Label67.Caption = "Artikel-Nr."

ComboBox24.Visible = True

ComboBox24.BackColor = &HFFFFC0

If ComboBox17.Value <> "" Then

AAPP = ComboBox17.ListIndex + 2

ComboBox24.Clear

For SCHOT = 1 To 1260

AAAC = 45 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

With ComboBox24

.AddItem ZZFFF3.Cells(SCHOT + 1, 2).Value

End With

End If

Next SCHOT

End If

End If

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox4_Change()

On Error GoTo EERR

Dim AAAZ As Long

TextBox2.Value = ""

ListBox1.ListIndex = ListBox1.ListCount - 1

AAAZ = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox4.Value, lookat:=xlWhole).Row)

TextBox2.Value = AAAZ

ListBox1.BoundColumn = 13

ListBox1.ColumnCount = 13

ListBox1.BackColor = &HFFFF&

With ZZFFF7

ListBox1.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 15)).Address(External:=True)

End With

If ComboBox4.Value <> "" Then

ListBox1.ListIndex = AAAZ - 2

Else:

ListBox1.ListIndex = ListBox1.ListCount - 1

End If

Exit Sub

EERR:

ComboBox4.Value = ""

End Sub

 

Private Sub ComboBox4_Enter()

On Error GoTo EERR

ListBox1.BoundColumn = 13

ListBox1.ColumnCount = 13

ListBox1.BackColor = &HFFFF&

With ZZFFF7

ListBox1.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 15)).Address(External:=True)

End With

If ComboBox4.Value <> "" Then

ListBox1.ListIndex = ComboBox4.ListIndex

Else:

ListBox1.ListIndex = ListBox1.ListCount - 1

End If

Exit Sub

EERR:

End Sub

 

Private Sub TextBox16_Change()

On Error GoTo EERR

If TextBox16.Value <> "" Then

Dim DDNN As Variant

Dim AAPP As Long

Dim AAAZ As Long

Dim AAAC As Long

AAAZ = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox2.Value, lookat:=xlWhole).Row)

AAPP = ComboBox2.ListIndex + 2

If ZZFFF5.Cells(AAPP, 3) <> "" Then

MsgBox "Bestand von diesem Lagerplatzkonto ist mehr als Null, es kann nicht gelöscht werden!", 48, "http://excel.hpage.de    "

ComboBox2.SetFocus

Exit Sub

End If

AAAC = (AAPP - 2) * 8 + 2

ZZFFF6.Cells(5, AAAC) = "_"

AAAZ = CDbl(ZZFFF6.Cells(Rows.Count, AAAC).End(xlUp).Row)

ZZFFF6.Activate

ZZFFF6.Range(Cells(5, AAAC), Cells(AAAZ, AAAC + 7)).Value = ""

ZZFFF6.Range(Cells(1, AAAC), Cells(3, AAAC + 7)).Value = ""

TextBox2.Value = ComboBox2.Value

ZZFFF5.Activate

ZZFFF5.Range(Cells(AAPP, 2), Cells(AAPP, 8528)).Value = ""

ZZFFF1.Activate

MsgBox "Lagerplatzkonto " & TextBox2.Value & " ist gelöscht!", 48, "http://excel.hpage.de    "

TextBox16.Value = ""

With ZZFFF5

ComboBox2.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 2)).Address(External:=True)

End With

With ZZFFF5

ListBox1.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 4)).Address(External:=True)

End With

If ComboBox2.Value <> "" Then

ListBox1.ListIndex = ComboBox2.ListIndex

Else:

ListBox1.ListIndex = ListBox1.ListCount - 1

End If

End If

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton24_Click()

On Error GoTo EERR

ZZFFF2.[n14] = "KdKo"

CommandButton24.Visible = False

UserForm2.Show

Exit Sub

EERR:

Dim AAPP As Long

Dim AAAZ As Long

Dim AAAC As Long

AAAZ = CDbl(ZZFFF8.Range("b2:b1048571").Cells.Find(What:=ComboBox13.Value, lookat:=xlWhole).Row)

AAPP = ComboBox13.ListIndex + 2

TextBox2.Value = ""

For AAAC = 45 To 2564

If ZZFFF8.Cells(AAPP, AAAC) <> "" Then

TextBox2.Value = "Ja"

End If

Next AAAC

If TextBox2.Value <> "" Then

MsgBox "Bestand von diesem Kundenkonto ist mehr als Null, es kann nicht gelöscht werden!", 48, "http://excel.hpage.de    "

ComboBox13.SetFocus

Exit Sub

End If

TextBox2.Value = ComboBox13.Value

ZZFFF8.Activate

ZZFFF8.Range(Cells(AAPP, 2), Cells(AAPP, 6660)).Value = ""

ZZFFF1.Activate

MsgBox "Kundenkonto " & TextBox2.Value & " ist gelöscht!", 48, "http://excel.hpage.de    "

Exit Sub

End Sub

 

Private Sub CommandButton20_Click()

On Error GoTo EERR

ZZFFF2.[n14] = "LiKo"

CommandButton12.Visible = False

UserForm2.Show

Exit Sub

EERR:

End Sub

 

Private Sub TextBox17_Change()

On Error GoTo EERR

If TextBox17.Value <> "" Then

Dim AAPP As Long

Dim AAAZ As Long

Dim AAAC As Long

AAAZ = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox7.Value, lookat:=xlWhole).Row)

AAPP = ComboBox7.ListIndex + 2

TextBox2.Value = ""

If ZZFFF7.Cells(AAPP, 13) <> "" Then

MsgBox "Bestand von diesem Lieferantenkonto ist mehr als Null, es kann nicht gelöscht werden!", 48, "http://excel.hpage.de    "

ComboBox7.SetFocus

Exit Sub

End If

TextBox2.Value = ComboBox7.Value

ZZFFF7.Activate

ZZFFF7.Range(Cells(AAPP, 2), Cells(AAPP, 11706)).Value = ""

ZZFFF1.Activate

MsgBox "Lieferantenkonto " & TextBox2.Value & " ist gelöscht!", 48, "http://excel.hpage.de    "

TextBox17.Value = ""

With ZZFFF7

ComboBox7.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 2)).Address(External:=True)

ComboBox5.RowSource = .Range(.Cells(2, 3), .Cells(.Cells(Rows.Count, 3).End(xlUp).Row, 3)).Address(External:=True)

ComboBox6.RowSource = .Range(.Cells(2, 6), .Cells(.Cells(Rows.Count, 6).End(xlUp).Row, 6)).Address(External:=True)

End With

With ZZFFF7

ListBox2.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 13)).Address(External:=True)

End With

If ComboBox7.Value <> "" Then

ListBox2.ListIndex = ComboBox7.ListIndex

Else:

ListBox2.ListIndex = ListBox2.ListCount - 1

End If

End If

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton22_Click()

On Error Resume Next

ZZFFF11.Activate

ActiveSheet.Rows("1:1").RowHeight = 15.75

ActiveSheet.Rows("2:2").RowHeight = 15.75

Dim SEGG

For Each SEGG In ActiveSheet.Shapes

If Not Intersect(SEGG.TopLeftCell, ActiveCell) Is Nothing Then SEGG.Delete

Next SEGG

ActiveSheet.Range("a1:r100009").Value = ""

ActiveSheet.Range("c3:c3003").NumberFormat = "General"

ActiveSheet.Range("a1:r8").Font.Bold = False

ActiveSheet.DrawingObjects.Delete

Dim DDAATT As String

Dim ZZEELL As Range

Dim SCAAL As Double

Dim AAPP As Long

Dim SCHOT As Long

Dim AAAC As Long

Dim AAAR As Long

Dim RRRR As Long

Dim AAAZ As Long

If ComboBox9.Value = "" Then

AAAZ = CDbl(ZZFFF7.Cells(Rows.Count, 2).End(xlUp).Row)

ZZFFF7.Activate

ActiveSheet.Range(Cells(1, 2), Cells(AAAZ, 14)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1] = "Lieferantendatenbank"

ZZFFF11.[a2].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 13

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox9.BackColor = &HFFFF& And ComboBox9.Value = "Bestand/Artikeln" Then

If ComboBox7.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox7.SetFocus

Exit Sub

End If

AAPP = ComboBox7.ListIndex + 2

ZZFFF11.[a1] = "Bestand/Artikeln"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 45 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF7.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 5) > 0 Then

ZZFFF11.Cells(RRRR, 7) = Round(ZZFFF11.Cells(RRRR, 6) / ZZFFF11.Cells(RRRR, 5), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 7

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox9.BackColor = &HFFFF& And ComboBox9.Value = "Zugang/Artikeln" Then

If ComboBox7.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox7.SetFocus

Exit Sub

End If

AAPP = ComboBox7.ListIndex + 2

ZZFFF11.[a1] = "Zugang/Artikeln"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 6664 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF7.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 5) > 0 Then

ZZFFF11.Cells(RRRR, 7) = Round(ZZFFF11.Cells(RRRR, 6) / ZZFFF11.Cells(RRRR, 5), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 7

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox9.BackColor = &HFFFF& And ComboBox9.Value = "Entnahme/Artikeln" Then

If ComboBox7.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox7.SetFocus

Exit Sub

End If

AAPP = ComboBox7.ListIndex + 2

ZZFFF11.[a1] = "Entnahme/Artikeln"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 9186 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF7.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 5) > 0 Then

ZZFFF11.Cells(RRRR, 7) = Round(ZZFFF11.Cells(RRRR, 6) / ZZFFF11.Cells(RRRR, 5), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 7

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox9.BackColor = &HFFFF& And ComboBox9.Value = "Lieferant/Lagerplätze" Then

If ComboBox7.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox7.SetFocus

Exit Sub

End If

AAPP = ComboBox7.ListIndex + 2

ZZFFF11.[a1] = "Lieferant/Lagerplätze"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Lagerplatz"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 2047

AAAC = 2567 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF5.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF7.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(AAPP, AAAC + 1)

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox9.BackColor = &HFFFF& And ComboBox9.Value = "Lieferant/Artikel/Lagerplätze" Then

If ComboBox7.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox7.SetFocus

Exit Sub

End If

If ComboBox10.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox10.SetFocus

Exit Sub

End If

AAPP = ComboBox7.ListIndex + 2

ZZFFF11.[a1] = ComboBox7.Value & "_" & ComboBox10.Value & "/Lagerplätze"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

TextBox2.Value = ""

AAAZ = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox10.Value, lookat:=xlWhole).Row)

TextBox2.Value = AAAZ

AAPP = CLng(TextBox2.Value)

AAAR = ComboBox7.ListIndex + 2

For SCHOT = 2 To 4

ZZFFF11.Cells(SCHOT + 8, 1) = ZZFFF3.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT + 8, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT + 8, 2) = ZZFFF3.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Lagerplatz"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Preis"

ZZFFF11.[f2].Font.Bold = True

AAAZ = ZZFFF3.Cells(AAPP, 16383) + AAAR - 2

AAAC = ZZFFF3.Cells(AAPP, 16384)

RRRR = 2

For SCHOT = 0 To 2046

If ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2)) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF5.Cells(SCHOT + 2, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2))

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2) + 1)

If ZZFFF11.Cells(RRRR, 4) > 0 Then

ZZFFF11.Cells(RRRR, 6) = Round(ZZFFF11.Cells(RRRR, 5) / ZZFFF11.Cells(RRRR, 4), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

Exit Sub

End Sub

 

Private Sub TextBox13_Exit(ByVal Cancel As MSForms.ReturnBoolean)

On Error GoTo EERR

If TextBox13.Value <> "" Then

TextBox13.Value = CDbl(TextBox13.Value)

End If

Exit Sub

EERR:

TextBox13.Value = ""

End Sub

 

Private Sub TextBox40_Enter()

On Error GoTo EERR

Dim AAAZ As Long

If ComboBox16.Value <> "" Then

AAAZ = CDbl(ZZFFF2.Range("a7:b1048571").Cells.Find(What:=ComboBox16.Value, lookat:=xlWhole).Row)

End If

ComboBox23.BackColor = &HFFFFFF

ComboBox23.Value = ""

ListBox4.BoundColumn = 11

ListBox4.ColumnCount = 11

ListBox4.BackColor = &HFFFFFF

ListBox4.ColumnWidths = "50;80;60;80;100;40;60;60;60;80;40"

With ZZFFF2

ListBox4.RowSource = .Range(.Cells(8, 1), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 11)).Address(External:=True)

End With

If ComboBox16.Value <> "" Then

ListBox4.ListIndex = AAAZ - 8

Else:

ListBox4.ListIndex = ListBox4.ListCount - 1

End If

Label66.Visible = False

ComboBox23.Visible = False

Exit Sub

EERR:

End Sub

 

Private Sub TextBox40_Exit(ByVal Cancel As MSForms.ReturnBoolean)

On Error GoTo EERR

TextBox40.Value = CDbl(TextBox40.Value)

Exit Sub

EERR:

TextBox40.Value = 0

End Sub

 

Private Sub TextBox49_Change()

On Error GoTo EERR

TextBox50.Value = ""

ZZFFF2.[k1] = CDbl(TextBox49.Value)

If CDbl(TextBox49.Value) < 0 Then

TextBox49.Value = CDbl(TextBox49.Value) * -1

End If

ZZFFF5.[a10] = ""

If Label212.Caption <> "" Then

ZZFFF5.[a10] = Label212.Caption

End If

ZZFFF5.[a11] = ""

If Label214.Caption <> "" Then

ZZFFF5.[a11] = Label214.Caption

End If

If ZZFFF5.[a10] > 0 Then

Label114.Caption = Round(ZZFFF5.[a11] / ZZFFF5.[a10] * CDbl(TextBox49.Value), 2)

TextBox50.Value = Label114.Caption

Else:

TextBox50.Value = 0

End If

Exit Sub

EERR:

TextBox49.Value = ""

ZZFFF2.[k1] = ""

TextBox50.Value = ""

End Sub

 

Private Sub TextBox49_Enter()

On Error GoTo EERR

On Error GoTo EERR

Dim AAAZ As Long

If ComboBox32.Value <> "" Then

AAAZ = CDbl(ZZFFF2.Range("a7:b1048571").Cells.Find(What:=ComboBox32.Value, lookat:=xlWhole).Row)

End If

ComboBox38.BackColor = &HFFFFFF

ComboBox38.Value = ""

ListBox6.BoundColumn = 11

ListBox6.ColumnCount = 11

ListBox6.BackColor = &HFFFFFF

ListBox6.ColumnWidths = "50;80;60;80;100;40;60;60;60;80;40"

With ZZFFF2

ListBox6.RowSource = .Range(.Cells(8, 1), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 11)).Address(External:=True)

End With

If ComboBox32.Value <> "" Then

ListBox6.ListIndex = AAAZ - 8

Else:

ListBox6.ListIndex = ListBox6.ListCount - 1

End If

Label191.Visible = False

ComboBox38.Visible = False

Exit Sub

EERR:

End Sub

 

Private Sub TextBox49_Exit(ByVal Cancel As MSForms.ReturnBoolean)

On Error GoTo EERR

TextBox50.Value = ""

ZZFFF2.[k1] = CDbl(TextBox49.Value)

If CDbl(TextBox49.Value) < 0 Then

TextBox49.Value = CDbl(TextBox49.Value) * -1

End If

ZZFFF5.[a10] = ""

If Label212.Caption <> "" Then

ZZFFF5.[a10] = Label212.Caption

End If

ZZFFF5.[a11] = ""

If Label214.Caption <> "" Then

ZZFFF5.[a11] = Label214.Caption

End If

If ZZFFF5.[a10] > 0 Then

Label114.Caption = Round(ZZFFF5.[a11] / ZZFFF5.[a10] * CDbl(TextBox49.Value), 2)

TextBox50.Value = Label114.Caption

Else:

TextBox50.Value = 0

End If

Exit Sub

EERR:

TextBox49.Value = ""

ZZFFF2.[k1] = ""

TextBox50.Value = ""

End Sub

 

Private Sub TextBox53_Change()

On Error GoTo EERR

TextBox54.Value = ""

ZZFFF2.[k1] = CDbl(TextBox53.Value)

If CDbl(TextBox53.Value) < 0 Then

TextBox53.Value = CDbl(TextBox53.Value) * -1

End If

If Label286.Caption <> "" Then

Label114.Caption = Round(CDbl(Label285.Caption) / CDbl(Label283.Caption) * CDbl(TextBox53.Value), 2)

TextBox54.Value = Label114.Caption

End If

Exit Sub

EERR:

TextBox53.Value = ""

ZZFFF2.[k1] = ""

TextBox54.Value = ""

End Sub

 

Private Sub TextBox53_Enter()

On Error GoTo EERR

Dim AAAZ As Long

Dim SPOS As Long

Dim POSP As Long

POSP = 0

TextBox1.Value = "TextBox53"

If ComboBox40.Value <> "" Then

AAAZ = CDbl(ZZFFF9.Range("a2:a1048571").Cells.Find(What:=ComboBox40.Value, lookat:=xlWhole).Row)

If ComboBox41.Value <> "" Then

SPOS = ComboBox41.Value

POSP = ZZFFF9.Cells(AAAZ, SPOS + 487).Value

End If

End If

ComboBox47.BackColor = &HFFFFFF

ComboBox47.Value = ""

ListBox7.BoundColumn = 11

ListBox7.ColumnCount = 11

ListBox7.BackColor = &HFFFFFF

ListBox7.ColumnWidths = "50;80;60;80;100;40;60;60;60;80;40"

With ZZFFF2

ListBox7.RowSource = .Range(.Cells(8, 1), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 11)).Address(External:=True)

End With

If POSP > 0 Then

ListBox7.ListIndex = POSP - 8

Else:

ListBox7.ListIndex = ListBox7.ListCount - 1

End If

Label254.Visible = False

ComboBox47.Visible = False

Exit Sub

EERR:

End Sub

 

Private Sub TextBox53_Exit(ByVal Cancel As MSForms.ReturnBoolean)

On Error GoTo EERR

TextBox54.Value = ""

ZZFFF2.[k1] = CDbl(TextBox53.Value)

If CDbl(TextBox53.Value) < 0 Then

TextBox53.Value = CDbl(TextBox53.Value) * -1

End If

If Label286.Caption <> "" Then

Label114.Caption = Round(CDbl(Label285.Caption) / CDbl(Label283.Caption) * CDbl(TextBox53.Value), 2)

TextBox54.Value = Label114.Caption

End If

Exit Sub

EERR:

TextBox53.Value = ""

ZZFFF2.[k1] = ""

TextBox54.Value = ""

End Sub

 

Private Sub ComboBox41_Change()

On Error GoTo EERR

Dim ††† As Long

Dim AAPP2 As Long

Dim AAPP3 As Long

Dim AAPP4 As Long

Dim AAPP5 As Long

Dim AAPP6 As Long

Dim AAPP7 As Long

Dim AAPP8 As Long

Dim AAPP9 As Long

Dim AAAZ As Long

Dim SPOS As Long

Dim POSP As Long

If TextBox1.Value = "ComboBox41" Then

ListBox7.ColumnWidths = ""

ListBox7.BoundColumn = 11

ListBox7.ColumnCount = 11

ListBox7.BackColor = &HFFC0C0

CommandButton40.Visible = False

If ComboBox41.Value <> "" Then

CommandButton40.Visible = True

ZZFFF2.[ab8] = ""

AAAZ = CDbl(ZZFFF10.Range("a16:a55").Cells.Find(What:=ComboBox41.Value, lookat:=xlWhole).Row)

If ComboBox40.Value <> "" Then

TextBox52.Value = ""

TextBox53.Value = ""

TextBox54.Value = ""

ComboBox45.Value = ""

ComboBox43.Value = ""

ComboBox44.Value = ""

ComboBox46.Value = ""

ComboBox42.Value = ""

AAAZ = CDbl(ZZFFF9.Range("a2:a1048571").Cells.Find(What:=ComboBox40.Value, lookat:=xlWhole).Row)

If ComboBox41.Value <> "" Then

SPOS = ComboBox41.Value

POSP = ZZFFF9.Cells(AAAZ, SPOS + 487).Value

ZZFFF2.[ab8] = ZZFFF9.Cells(AAAZ, SPOS + 445).Value

AAAZ = CDbl(ZZFFF2.Range("bh7:bh1048571").Cells.Find(What:=POSP, lookat:=xlWhole).Row)

††† = ZZFFF2.Cells(AAAZ, 60).Value

AAPP3 = ZZFFF2.Cells(AAAZ, 61).Value

AAPP2 = ZZFFF2.Cells(AAAZ, 62).Value

AAPP4 = ZZFFF2.Cells(AAAZ, 63).Value

AAPP8 = ZZFFF2.Cells(AAAZ, 73).Value

TextBox52.Value = ZZFFF2.Cells(†††, 3).Value

TextBox53.Value = ZZFFF2.Cells(†††, 7).Value

TextBox54.Value = ZZFFF2.Cells(†††, 8).Value

ComboBox45.Value = ZZFFF7.Cells(AAPP2, 2).Value

ComboBox43.Value = ZZFFF3.Cells(AAPP3, 2).Value

ComboBox44.Value = ZZFFF3.Cells(AAPP3, 3).Value

ComboBox46.Value = ZZFFF5.Cells(AAPP4, 2).Value

ComboBox42.Value = ZZFFF8.Cells(AAPP8, 2).Value

End If

End If

End If

With ZZFFF10

ListBox7.RowSource = .Range(.Cells(16, 1), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 11)).Address(External:=True)

End With

If ComboBox41.Value <> "" Then

ListBox7.ListIndex = ComboBox41.ListIndex

Else:

ListBox7.ListIndex = ListBox7.ListCount - 1

End If

Call ComboBox43_Change

Call ComboBox45_Change

End If

Exit Sub

EERR:

ComboBox41.Value = ""

End Sub

 

Private Sub ComboBox41_Enter()

On Error GoTo EERR

Dim AAAZ As Long

TextBox1.Value = "ComboBox41"

Label254.Visible = False

ComboBox47.Visible = False

ListBox7.ColumnWidths = ""

ListBox7.BoundColumn = 11

ListBox7.ColumnCount = 11

ListBox7.BackColor = &HFFC0C0

If ComboBox41.Value <> "" Then

AAAZ = CDbl(ZZFFF10.Range("a16:a55").Cells.Find(What:=ComboBox41.Value, lookat:=xlWhole).Row)

AAAZ = ComboBox41.ListIndex + 2

End If

With ZZFFF10

ListBox7.RowSource = .Range(.Cells(16, 1), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 11)).Address(External:=True)

End With

If ComboBox41.Value <> "" Then

ListBox7.ListIndex = ComboBox41.ListIndex

Else:

ListBox7.ListIndex = ListBox7.ListCount - 1

End If

Exit Sub

EERR:

ComboBox41.Value = ""

End Sub

 

Private Sub TextBox41_Enter()

On Error GoTo EERR

Dim AAAZ As Long

If ComboBox16.Value <> "" Then

AAAZ = CDbl(ZZFFF2.Range("a7:b1048571").Cells.Find(What:=ComboBox16.Value, lookat:=xlWhole).Row)

End If

ComboBox23.BackColor = &HFFFFFF

ComboBox23.Value = ""

ListBox4.BoundColumn = 11

ListBox4.ColumnCount = 11

ListBox4.BackColor = &HFFFFFF

ListBox4.ColumnWidths = "50;80;60;80;100;40;60;60;60;80;40"

With ZZFFF2

ListBox4.RowSource = .Range(.Cells(8, 1), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 11)).Address(External:=True)

End With

If ComboBox16.Value <> "" Then

ListBox4.ListIndex = AAAZ - 8

Else:

ListBox4.ListIndex = ListBox4.ListCount - 1

End If

Label66.Visible = False

ComboBox23.Visible = False

Exit Sub

EERR:

End Sub

 

Private Sub TextBox41_Exit(ByVal Cancel As MSForms.ReturnBoolean)

On Error GoTo EERR

TextBox41.Value = Round(CDbl(TextBox41.Value), 2)

Exit Sub

EERR:

TextBox41.Value = ""

End Sub

 

Private Sub TextBox45_Enter()

On Error GoTo EERR

Dim AAAZ As Long

If ComboBox25.Value <> "" Then

AAAZ = CDbl(ZZFFF2.Range("a7:b1048571").Cells.Find(What:=ComboBox25.Value, lookat:=xlWhole).Row)

If CDbl(TextBox45.Value) < 0 Then

TextBox45.Value = CDbl(TextBox45.Value) * -1

End If

End If

ComboBox30.BackColor = &HFFFFFF

ComboBox30.Value = ""

ListBox5.BoundColumn = 11

ListBox5.ColumnCount = 11

ListBox5.BackColor = &HFFFFFF

ListBox5.ColumnWidths = "50;80;60;80;100;40;60;60;60;80;40"

With ZZFFF2

ListBox5.RowSource = .Range(.Cells(8, 1), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 11)).Address(External:=True)

End With

If ComboBox25.Value <> "" Then

ListBox5.ListIndex = AAAZ - 8

Else:

ListBox5.ListIndex = ListBox5.ListCount - 1

End If

Label128.Visible = False

ComboBox30.Visible = False

Exit Sub

EERR:

End Sub

 

Private Sub TextBox45_Exit(ByVal Cancel As MSForms.ReturnBoolean)

On Error GoTo EERR

If CDbl(TextBox45.Value) < 0 Then

TextBox45.Value = CDbl(TextBox45.Value) * -1

End If

TextBox45.Value = Round(CDbl(TextBox45.Value), 2)

Exit Sub

EERR:

TextBox45.Value = ""

End Sub

 

Private Sub CommandButton11_Click()

On Error GoTo EERR

Frame1.Visible = False

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton19_Click()

On Error GoTo EERR

Frame2.Visible = False

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton35_Click()

On Error GoTo EERR

Frame6.Visible = False

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton39_Click()

On Error GoTo EERR

Frame7.Visible = False

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton31_Click()

On Error GoTo EERR

Frame5.Visible = False

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton23_Click()

On Error GoTo EERR

Frame3.Visible = False

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton27_Click()

On Error GoTo EERR

Frame4.Visible = False

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton18_Click()

On Error Resume Next

ZZFFF11.Activate

ActiveSheet.Rows("1:1").RowHeight = 15.75

ActiveSheet.Rows("2:2").RowHeight = 15.75

Dim SEGG

For Each SEGG In ActiveSheet.Shapes

If Not Intersect(SEGG.TopLeftCell, ActiveCell) Is Nothing Then SEGG.Delete

Next SEGG

ActiveSheet.Range("a1:r100009").Value = ""

ActiveSheet.Range("c3:c3003").NumberFormat = "General"

ActiveSheet.Range("a1:r8").Font.Bold = False

ActiveSheet.DrawingObjects.Delete

Dim DDAATT As String

Dim ZZEELL As Range

Dim SCAAL As Double

Dim AAPP As Long

Dim SCHOT As Long

Dim AAAC As Long

Dim AAAR As Long

Dim RRRR As Long

Dim AAAZ As Long

If ComboBox3.BackColor = &HFFFFC0 And ComboBox3.Value = "" Then

AAAZ = CDbl(ZZFFF3.Cells(Rows.Count, 2).End(xlUp).Row)

ZZFFF3.Activate

ActiveSheet.Range(Cells(1, 2), Cells(AAAZ, 8)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1] = "Aktueller Bestand Art."

ZZFFF11.[a2].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

ZZFFF11.[h2] = "Stand"

ZZFFF11.[h2].Font.Bold = True

For SCHOT = 3 To 1263

If ZZFFF11.Cells(SCHOT, 5) < ZZFFF11.Cells(SCHOT, 4) Then

ZZFFF11.Cells(SCHOT, 8) = "Melden!"

End If

Next SCHOT

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 8

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox3.Value = "Artikelkonto" Then

If ComboBox1.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox1.SetFocus

Exit Sub

End If

ZZFFF4.Activate

ActiveSheet.Range(Cells(1, 1), Cells(7, 1)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1].Select

ZZFFF11.Paste

AAPP = ComboBox1.ListIndex + 2

AAAC = (AAPP - 2) * 7 + 2

AAAZ = CDbl(ZZFFF4.Cells(Rows.Count, AAAC).End(xlUp).Row)

ZZFFF4.Activate

ZZFFF4.Range(Cells(1, AAAC), Cells(AAAZ, AAAC + 6)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[b1].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

ZZFFF11.Cells(1, 2) = ZZFFF3.Cells(AAPP, 2)

ZZFFF11.Cells(2, 2) = ZZFFF3.Cells(AAPP, 3)

ZZFFF11.Cells(3, 2) = ZZFFF3.Cells(AAPP, 4)

ZZFFF11.Cells(7, 2) = ZZFFF3.Cells(AAPP, 5)

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b1] & ":    &P/&N"

End With

For SCHOT = 1 To 8

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox3.BackColor = &HFFFFC0 And ComboBox3.Value = "Zugang" Then

ZZFFF11.[a1] = "Art_Zugang"

ZZFFF11.[a2] = "Artikelnummer"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[b2] = "Bezeichnung"

ZZFFF11.[b2].Font.Bold = True

ZZFFF11.[c2] = "Zugang Menge"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Zugang Wert"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Zugang Preis"

ZZFFF11.[e2].Font.Bold = True

RRRR = 2

For SCHOT = 2 To 1261

If ZZFFF3.Cells(SCHOT, 13) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 1) = ZZFFF3.Cells(SCHOT, 2)

ZZFFF11.Cells(RRRR, 2) = ZZFFF3.Cells(SCHOT, 3)

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT, 13)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT, 14)

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(SCHOT, 15)

End If

Next SCHOT

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox3.BackColor = &HFFFFC0 And ComboBox3.Value = "Entnahme" Then

ZZFFF11.[a1] = "Art_Entnahme"

ZZFFF11.[a2] = "Artikelnummer"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[b2] = "Bezeichnung"

ZZFFF11.[b2].Font.Bold = True

ZZFFF11.[c2] = "Entnahme Menge"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Entnahme Wert"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Entnahme Preis"

ZZFFF11.[e2].Font.Bold = True

RRRR = 2

For SCHOT = 2 To 1261

If ZZFFF3.Cells(SCHOT, 17) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 1) = ZZFFF3.Cells(SCHOT, 2)

ZZFFF11.Cells(RRRR, 2) = ZZFFF3.Cells(SCHOT, 3)

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT, 17)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT, 18)

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(SCHOT, 19)

End If

Next SCHOT

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox3.Value = "Artikel/Lagerplätze" Then

If ComboBox1.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox1.SetFocus

Exit Sub

End If

ZZFFF11.[a1] = "Artikel/Lagerplätze"

ZZFFF11.[a2] = "Artikelnummer:"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[a3] = "Bezeichnung:"

ZZFFF11.[a3].Font.Bold = True

ZZFFF11.[a4] = "Einheit:"

ZZFFF11.[a4].Font.Bold = True

ZZFFF11.[b2] = ComboBox1.Value

ZZFFF11.[b3] = TextBox7.Value

ZZFFF11.[b4] = TextBox8.Value

ZZFFF11.[c2] = "Lagerplatz"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Preis"

ZZFFF11.[f2].Font.Bold = True

AAPP = ComboBox1.ListIndex + 2

RRRR = 2

For SCHOT = 1 To 2047

AAAC = 44 + ((SCHOT - 1) * 2)

If ZZFFF3.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF5.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 4) > 0 Then

ZZFFF11.Cells(RRRR, 6) = Round(ZZFFF11.Cells(RRRR, 5) / ZZFFF11.Cells(RRRR, 4), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox3.Value = "Artikel/Lieferanten" Then

If ComboBox1.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox1.SetFocus

Exit Sub

End If

ZZFFF11.[a1] = "Artikel/Lieferanten"

ZZFFF11.[a2] = "Artikelnummer:"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[a3] = "Bezeichnung:"

ZZFFF11.[a3].Font.Bold = True

ZZFFF11.[a4] = "Einheit:"

ZZFFF11.[a4].Font.Bold = True

ZZFFF11.[b2] = ComboBox1.Value

ZZFFF11.[b3] = TextBox7.Value

ZZFFF11.[b4] = TextBox8.Value

ZZFFF11.[c2] = "Lieferant"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Preis"

ZZFFF11.[f2].Font.Bold = True

AAPP = ComboBox1.ListIndex + 2

AAAC = (AAPP - 2) * 2 + 45

RRRR = 2

For SCHOT = 2 To 3001

If ZZFFF7.Cells(SCHOT, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF7.Cells(SCHOT, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF7.Cells(SCHOT, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(SCHOT, AAAC + 1)

If ZZFFF11.Cells(RRRR, 4) > 0 Then

ZZFFF11.Cells(RRRR, 6) = Round(ZZFFF11.Cells(RRRR, 5) / ZZFFF11.Cells(RRRR, 4), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox3.Value = "Artikel/Lieferant/Lagerplätze" Then

If ComboBox1.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox1.SetFocus

Exit Sub

End If

If ComboBox4.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox4.SetFocus

Exit Sub

End If

AAPP = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox4.Value, lookat:=xlWhole).Row)

ZZFFF11.[a1] = ComboBox1.Value & "_" & ComboBox4.Value & "/Lagerplätze"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

TextBox2.Value = ""

AAAZ = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox4.Value, lookat:=xlWhole).Row)

TextBox2.Value = AAAZ

AAAR = CLng(TextBox2.Value)

AAPP = ComboBox1.ListIndex + 2

For SCHOT = 2 To 4

ZZFFF11.Cells(SCHOT + 8, 1) = ZZFFF3.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT + 8, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT + 8, 2) = ZZFFF3.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Lagerplatz"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Preis"

ZZFFF11.[f2].Font.Bold = True

AAAZ = ZZFFF3.Cells(AAPP, 16383) + AAAR - 2

AAAC = ZZFFF3.Cells(AAPP, 16384)

RRRR = 2

For SCHOT = 0 To 2046

If ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2)) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF5.Cells(SCHOT + 2, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2))

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2) + 1)

If ZZFFF11.Cells(RRRR, 4) > 0 Then

ZZFFF11.Cells(RRRR, 6) = Round(ZZFFF11.Cells(RRRR, 5) / ZZFFF11.Cells(RRRR, 4), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox3.BackColor = &HC0FFC0 And ComboBox3.Value = "" Then

AAAZ = CDbl(ZZFFF5.Cells(Rows.Count, 2).End(xlUp).Row)

ZZFFF5.Activate

ActiveSheet.Range(Cells(1, 2), Cells(AAAZ, 4)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1] = "Aktueller Bestand LP"

ZZFFF11.[a2].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 3

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox2.Value <> "" And ComboBox3.Value = "Lagerplatzkonto" Then

ZZFFF6.Activate

ActiveSheet.Range(Cells(1, 1), Cells(3, 1)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1].Select

ZZFFF11.Paste

AAPP = ComboBox2.ListIndex + 2

AAAC = (AAPP - 2) * 8 + 2

AAAZ = CDbl(ZZFFF6.Cells(Rows.Count, AAAC).End(xlUp).Row)

ZZFFF6.Activate

ZZFFF6.Range(Cells(1, AAAC), Cells(AAAZ, AAAC + 7)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[b1].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

ZZFFF11.Cells(1, 2) = ComboBox2.Value

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b1] & ":    &P/&N"

End With

For SCHOT = 1 To 9

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox2.Value <> "" And ComboBox3.Value = "Lagerplatz/Artikeln" Then

ZZFFF11.[a1] = "Lagerplatz/Artikeln"

ZZFFF11.[a2] = "Lagerplatz:"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[b2] = ComboBox2.Value

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

AAPP = ComboBox2.ListIndex + 2

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 7 + ((SCHOT - 1) * 2)

If ZZFFF5.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF5.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF5.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 5) > 0 Then

ZZFFF11.Cells(RRRR, 7) = Round(ZZFFF11.Cells(RRRR, 6) / ZZFFF11.Cells(RRRR, 5), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox2.Value <> "" And ComboBox3.Value = "Lagerplatz/Lieferanten" Then

ZZFFF11.[a1] = "Lagerplatz/Lieferanten"

ZZFFF11.[a2] = "Lagerplatz:"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[b2] = ComboBox2.Value

ZZFFF11.[c2] = "Lief.-Nr. "

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

AAPP = ComboBox2.ListIndex + 2

RRRR = 2

For SCHOT = 1 To 3000

AAAC = 2529 + ((SCHOT - 1) * 2)

If ZZFFF5.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF7.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF5.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF5.Cells(AAPP, AAAC + 1)

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

Exit Sub

End Sub

 

Private Sub CommandButton38_Click()

On Error Resume Next

ZZFFF11.Activate

ActiveSheet.Rows("1:1").RowHeight = 15.75

ActiveSheet.Rows("2:2").RowHeight = 15.75

Dim SEGG

For Each SEGG In ActiveSheet.Shapes

If Not Intersect(SEGG.TopLeftCell, ActiveCell) Is Nothing Then SEGG.Delete

Next SEGG

ActiveSheet.Range("a1:r100009").Value = ""

ActiveSheet.Range("c3:c3003").NumberFormat = "General"

ActiveSheet.Range("a1:r8").Font.Bold = False

ActiveSheet.DrawingObjects.Delete

Dim DDAATT As String

Dim ZZEELL As Range

Dim SCAAL As Double

Dim AAPP As Long

Dim SCHOT As Long

Dim AAAC As Long

Dim AAAR As Long

Dim RRRR As Long

Dim AAAZ As Long

If ComboBox38.BackColor = &HFFFFFF Then

AAAZ = CDbl(ZZFFF2.Cells(Rows.Count, 1).End(xlUp).Row)

ZZFFF2.Activate

ActiveSheet.Range(Cells(6, 1), Cells(AAAZ, 11)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1] = "Grundbuch"

ZZFFF11.[a2].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 11

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

Exit Sub

End If

If ComboBox38.Value = "" And TextBox1.Value = "ComboBox35" Then

AAAZ = CDbl(ZZFFF7.Cells(Rows.Count, 2).End(xlUp).Row)

ZZFFF7.Activate

ActiveSheet.Range(Cells(1, 2), Cells(AAAZ, 14)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1] = "Lieferantendatenbank"

ZZFFF11.[a2].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 13

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox38.BackColor = &HFFFF& And ComboBox38.Value = "Bestand/Artikeln" Then

If ComboBox35.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox35.SetFocus

Exit Sub

End If

AAPP = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox35.Value, lookat:=xlWhole).Row)

ZZFFF11.[a1] = "Bestand/Artikeln"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 45 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF7.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 5) > 0 Then

ZZFFF11.Cells(RRRR, 7) = Round(ZZFFF11.Cells(RRRR, 6) / ZZFFF11.Cells(RRRR, 5), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 7

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox38.BackColor = &HFFFF& And ComboBox38.Value = "Zugang/Artikeln" Then

If ComboBox35.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox35.SetFocus

Exit Sub

End If

AAPP = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox35.Value, lookat:=xlWhole).Row)

ZZFFF11.[a1] = "Zugang/Artikeln"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 6664 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF7.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 5) > 0 Then

ZZFFF11.Cells(RRRR, 7) = Round(ZZFFF11.Cells(RRRR, 6) / ZZFFF11.Cells(RRRR, 5), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 7

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox38.BackColor = &HFFFF& And ComboBox38.Value = "Entnahme/Artikeln" Then

If ComboBox35.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox35.SetFocus

Exit Sub

End If

AAPP = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox35.Value, lookat:=xlWhole).Row)

ZZFFF11.[a1] = "Entnahme/Artikeln"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 9186 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF7.Cells(AAPP, AAAC + 1)

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox38.BackColor = &HFFFF& And ComboBox38.Value = "Lieferant/Lagerplätze" Then

If ComboBox35.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox35.SetFocus

Exit Sub

End If

AAPP = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox35.Value, lookat:=xlWhole).Row)

ZZFFF11.[a1] = "Lieferant/Lagerplätze"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Lagerplatz"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 2047

AAAC = 2567 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF5.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF7.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(AAPP, AAAC + 1)

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox38.BackColor = &HFFFF& And ComboBox38.Value = "Lieferant/Artikel/Lagerplätze" Then

If ComboBox35.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox35.SetFocus

Exit Sub

End If

If ComboBox39.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox39.SetFocus

Exit Sub

End If

AAPP = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox35.Value, lookat:=xlWhole).Row)

ZZFFF11.[a1] = ComboBox35.Value & "_" & ComboBox39.Value & "/Lagerplätze"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

AAPP = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox39.Value, lookat:=xlWhole).Row)

AAAR = CDbl(ZZFFF7.Range("b2:b1261").Cells.Find(What:=ComboBox35.Value, lookat:=xlWhole).Row)

For SCHOT = 2 To 4

ZZFFF11.Cells(SCHOT + 8, 1) = ZZFFF3.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT + 8, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT + 8, 2) = ZZFFF3.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Lagerplatz"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Preis"

ZZFFF11.[f2].Font.Bold = True

AAAZ = ZZFFF3.Cells(AAPP, 16383) + AAAR - 2

AAAC = ZZFFF3.Cells(AAPP, 16384)

RRRR = 2

For SCHOT = 0 To 2046

If ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2)) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF5.Cells(SCHOT + 2, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2))

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2) + 1)

If ZZFFF11.Cells(RRRR, 4) > 0 Then

ZZFFF11.Cells(RRRR, 6) = Round(ZZFFF11.Cells(RRRR, 5) / ZZFFF11.Cells(RRRR, 4), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox38.BackColor = &HFFFFC0 And ComboBox38.Value = "" Then

AAAZ = CDbl(ZZFFF3.Cells(Rows.Count, 2).End(xlUp).Row)

ZZFFF3.Activate

ActiveSheet.Range(Cells(1, 2), Cells(AAAZ, 8)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1] = "Aktueller Bestand Art."

ZZFFF11.[a2].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

ZZFFF11.[h2] = "Stand"

ZZFFF11.[h2].Font.Bold = True

For SCHOT = 3 To 1263

If ZZFFF11.Cells(SCHOT, 5) < ZZFFF11.Cells(SCHOT, 4) Then

ZZFFF11.Cells(SCHOT, 8) = "Melden!"

End If

Next SCHOT

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 8

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox38.Value = "Artikelkonto" Then

If ComboBox33.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox33.SetFocus

Exit Sub

End If

ZZFFF4.Activate

ActiveSheet.Range(Cells(1, 1), Cells(7, 1)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1].Select

ZZFFF11.Paste

AAPP = ComboBox33.ListIndex + 2

AAAC = (AAPP - 2) * 7 + 2

AAAZ = CDbl(ZZFFF4.Cells(Rows.Count, AAAC).End(xlUp).Row)

ZZFFF4.Activate

ZZFFF4.Range(Cells(1, AAAC), Cells(AAAZ, AAAC + 6)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[b1].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

ZZFFF11.Cells(1, 2) = ZZFFF3.Cells(AAPP, 2)

ZZFFF11.Cells(2, 2) = ZZFFF3.Cells(AAPP, 3)

ZZFFF11.Cells(3, 2) = ZZFFF3.Cells(AAPP, 4)

ZZFFF11.Cells(7, 2) = ZZFFF3.Cells(AAPP, 5)

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b1] & ":    &P/&N"

End With

For SCHOT = 1 To 8

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox38.BackColor = &HFFFFC0 And ComboBox38.Value = "Zugang" Then

ZZFFF11.[a1] = "Art_Zugang"

ZZFFF11.[a2] = "Artikelnummer"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[b2] = "Bezeichnung"

ZZFFF11.[b2].Font.Bold = True

ZZFFF11.[c2] = "Zugang Menge"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Zugang Wert"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Zugang Preis"

ZZFFF11.[e2].Font.Bold = True

RRRR = 2

For SCHOT = 2 To 1261

If ZZFFF3.Cells(SCHOT, 13) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 1) = ZZFFF3.Cells(SCHOT, 2)

ZZFFF11.Cells(RRRR, 2) = ZZFFF3.Cells(SCHOT, 3)

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT, 13)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT, 14)

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(SCHOT, 15)

End If

Next SCHOT

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox38.BackColor = &HFFFFC0 And ComboBox38.Value = "Entnahme" Then

ZZFFF11.[a1] = "Art_Entnahme"

ZZFFF11.[a2] = "Artikelnummer"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[b2] = "Bezeichnung"

ZZFFF11.[b2].Font.Bold = True

ZZFFF11.[c2] = "Entnahme Menge"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Entnahme Wert"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Entnahme Preis"

ZZFFF11.[e2].Font.Bold = True

RRRR = 2

For SCHOT = 2 To 1261

If ZZFFF3.Cells(SCHOT, 17) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 1) = ZZFFF3.Cells(SCHOT, 2)

ZZFFF11.Cells(RRRR, 2) = ZZFFF3.Cells(SCHOT, 3)

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT, 17)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT, 18)

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(SCHOT, 19)

End If

Next SCHOT

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox38.Value = "Artikel/Lagerplätze" Then

If ComboBox33.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox33.SetFocus

Exit Sub

End If

ZZFFF11.[a1] = "Artikel/Lagerplätze"

ZZFFF11.[a2] = "Artikelnummer:"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[a3] = "Bezeichnung:"

ZZFFF11.[a3].Font.Bold = True

ZZFFF11.[a4] = "Einheit:"

ZZFFF11.[a4].Font.Bold = True

ZZFFF11.[c2] = "Lagerplatz"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Preis"

ZZFFF11.[f2].Font.Bold = True

AAPP = ComboBox33.ListIndex + 2

ZZFFF11.[b2] = ZZFFF3.Cells(AAPP, 2)

ZZFFF11.[b3] = ZZFFF3.Cells(AAPP, 3)

ZZFFF11.[b4] = ZZFFF3.Cells(AAPP, 4)

RRRR = 2

For SCHOT = 1 To 2047

AAAC = 44 + ((SCHOT - 1) * 2)

If ZZFFF3.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF5.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 4) > 0 Then

ZZFFF11.Cells(RRRR, 6) = Round(ZZFFF11.Cells(RRRR, 5) / ZZFFF11.Cells(RRRR, 4), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox38.Value = "Artikel/Lieferanten" Then

If ComboBox33.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox33.SetFocus

Exit Sub

End If

ZZFFF11.[a1] = "Artikel/Lieferanten"

ZZFFF11.[a2] = "Artikelnummer:"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[a3] = "Bezeichnung:"

ZZFFF11.[a3].Font.Bold = True

ZZFFF11.[a4] = "Einheit:"

ZZFFF11.[a4].Font.Bold = True

ZZFFF11.[c2] = "Lieferant"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Preis"

ZZFFF11.[f2].Font.Bold = True

AAPP = ComboBox33.ListIndex + 2

ZZFFF11.[b2] = ZZFFF3.Cells(AAPP, 2)

ZZFFF11.[b3] = ZZFFF3.Cells(AAPP, 3)

ZZFFF11.[b4] = ZZFFF3.Cells(AAPP, 4)

AAAC = (AAPP - 2) * 2 + 45

RRRR = 2

For SCHOT = 2 To 3001

If ZZFFF7.Cells(SCHOT, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF7.Cells(SCHOT, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF7.Cells(SCHOT, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(SCHOT, AAAC + 1)

If ZZFFF11.Cells(RRRR, 4) > 0 Then

ZZFFF11.Cells(RRRR, 6) = Round(ZZFFF11.Cells(RRRR, 5) / ZZFFF11.Cells(RRRR, 4), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox38.Value = "Artikel/Lieferant/Lagerplätze" Then

If ComboBox33.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox33.SetFocus

Exit Sub

End If

If ComboBox39.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox39.SetFocus

Exit Sub

End If

AAPP = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox39.Value, lookat:=xlWhole).Row)

ZZFFF11.[a1] = ComboBox33.Value & "_" & ComboBox39.Value & "/Lagerplätze"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

TextBox2.Value = ""

AAAZ = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox39.Value, lookat:=xlWhole).Row)

TextBox2.Value = AAAZ

AAAR = CLng(TextBox2.Value)

AAPP = ComboBox33.ListIndex + 2

For SCHOT = 2 To 4

ZZFFF11.Cells(SCHOT + 8, 1) = ZZFFF3.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT + 8, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT + 8, 2) = ZZFFF3.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Lagerplatz"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Preis"

ZZFFF11.[f2].Font.Bold = True

AAAZ = ZZFFF3.Cells(AAPP, 16383) + AAAR - 2

AAAC = ZZFFF3.Cells(AAPP, 16384)

RRRR = 2

For SCHOT = 0 To 2046

If ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2)) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF5.Cells(SCHOT + 2, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2))

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2) + 1)

If ZZFFF11.Cells(RRRR, 4) > 0 Then

ZZFFF11.Cells(RRRR, 6) = Round(ZZFFF11.Cells(RRRR, 5) / ZZFFF11.Cells(RRRR, 4), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox38.BackColor = &HC0FFC0 And ComboBox38.Value = "" Then

AAAZ = CDbl(ZZFFF5.Cells(Rows.Count, 2).End(xlUp).Row)

ZZFFF5.Activate

ActiveSheet.Range(Cells(1, 2), Cells(AAAZ, 4)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1] = "Aktueller Bestand LP"

ZZFFF11.[a2].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 3

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox38.Value = "Lagerplatzkonto" And ComboBox38.BackColor = &HC0FFC0 Then

If ComboBox36.Value = "" Then

MsgBox "Lagerplatz ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox36.SetFocus

Exit Sub

End If

ZZFFF6.Activate

ActiveSheet.Range(Cells(1, 1), Cells(3, 1)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1].Select

ZZFFF11.Paste

AAPP = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox36.Value, lookat:=xlWhole).Row)

AAAC = (AAPP - 2) * 8 + 2

AAAZ = CDbl(ZZFFF6.Cells(Rows.Count, AAAC).End(xlUp).Row)

ZZFFF6.Activate

ZZFFF6.Range(Cells(1, AAAC), Cells(AAAZ, AAAC + 7)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[b1].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

ZZFFF11.Cells(1, 2) = ComboBox36.Value

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b1] & ":    &P/&N"

End With

For SCHOT = 1 To 9

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox38.Value = "Lagerplatz/Artikeln" And ComboBox38.BackColor = &HC0FFC0 Then

If ComboBox36.Value = "" Then

MsgBox "Lagerplatz ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox36.SetFocus

Exit Sub

End If

ZZFFF11.[a1] = "Lagerplatz/Artikeln"

ZZFFF11.[a2] = "Lagerplatz:"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[b2] = ComboBox36.Value

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

AAPP = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox36.Value, lookat:=xlWhole).Row)

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 7 + ((SCHOT - 1) * 2)

If ZZFFF5.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF5.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF5.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 5) > 0 Then

ZZFFF11.Cells(RRRR, 7) = Round(ZZFFF11.Cells(RRRR, 6) / ZZFFF11.Cells(RRRR, 5), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 7

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox38.Value = "Lagerplatz/Lieferanten" And ComboBox38.BackColor = &HC0FFC0 Then

If ComboBox36.Value = "" Then

MsgBox "Lagerplatz ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox36.SetFocus

Exit Sub

End If

ZZFFF11.[a1] = "Lagerplatz/Lieferanten"

ZZFFF11.[a2] = "Lagerplatz:"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[b2] = ComboBox36.Value

ZZFFF11.[c2] = "Lief.-Nr. "

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

AAPP = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox36.Value, lookat:=xlWhole).Row)

RRRR = 2

For SCHOT = 1 To 3000

AAAC = 2529 + ((SCHOT - 1) * 2)

If ZZFFF5.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF7.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF5.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF5.Cells(AAPP, AAAC + 1)

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox38.BackColor = &H80FF80 And ComboBox38.Value = "" Then

AAAZ = CDbl(ZZFFF5.Cells(Rows.Count, 2).End(xlUp).Row)

ZZFFF5.Activate

ActiveSheet.Range(Cells(1, 2), Cells(AAAZ, 4)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1] = "Aktueller Bestand LP"

ZZFFF11.[a2].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 3

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox38.Value = "Lagerplatzkonto" And ComboBox38.BackColor = &H80FF80 Then

If ComboBox37.Value = "" Then

MsgBox "Lagerplatz ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox37.SetFocus

Exit Sub

End If

ZZFFF6.Activate

ActiveSheet.Range(Cells(1, 1), Cells(3, 1)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1].Select

ZZFFF11.Paste

AAPP = ComboBox37.ListIndex + 2

AAAC = (AAPP - 2) * 8 + 2

AAAZ = CDbl(ZZFFF6.Cells(Rows.Count, AAAC).End(xlUp).Row)

ZZFFF6.Activate

ZZFFF6.Range(Cells(1, AAAC), Cells(AAAZ, AAAC + 7)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[b1].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

ZZFFF11.Cells(1, 2) = ComboBox37.Value

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b1] & ":    &P/&N"

End With

For SCHOT = 1 To 9

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox38.Value = "Lagerplatz/Artikeln" And ComboBox38.BackColor = &H80FF80 Then

If ComboBox37.Value = "" Then

MsgBox "Lagerplatz ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox37.SetFocus

Exit Sub

End If

ZZFFF11.[a1] = "Lagerplatz/Artikeln"

ZZFFF11.[a2] = "Lagerplatz:"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[b2] = ComboBox37.Value

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

AAPP = ComboBox37.ListIndex + 2

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 7 + ((SCHOT - 1) * 2)

If ZZFFF5.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF5.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF5.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 5) > 0 Then

ZZFFF11.Cells(RRRR, 7) = Round(ZZFFF11.Cells(RRRR, 6) / ZZFFF11.Cells(RRRR, 5), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 7

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox38.Value = "Lagerplatz/Lieferanten" And ComboBox38.BackColor = &H80FF80 Then

If ComboBox37.Value = "" Then

MsgBox "Lagerplatz ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox37.SetFocus

Exit Sub

End If

ZZFFF11.[a1] = "Lagerplatz/Lieferanten"

ZZFFF11.[a2] = "Lagerplatz:"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[b2] = ComboBox37.Value

ZZFFF11.[c2] = "Lief.-Nr. "

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

AAPP = ComboBox37.ListIndex + 2

RRRR = 2

For SCHOT = 1 To 3000

AAAC = 2529 + ((SCHOT - 1) * 2)

If ZZFFF5.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF7.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF5.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF5.Cells(AAPP, AAAC + 1)

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

Exit Sub

End Sub

 

Private Sub CommandButton42_Click()

On Error Resume Next

Dim DDAATT As String

Dim ZZEELL As Range

Dim SCAAL As Double

Dim AAPP As Long

Dim SCHOT As Long

Dim AAAC As Long

Dim AAAR As Long

Dim RRRR As Long

Dim AAAZ As Long

If TextBox1.Value = "ComboBox40" Then

ZZFFF12.Range("a2:py10000").Value = ""

AAAZ = CDbl(ZZFFF9.Cells(Rows.Count, 1).End(xlUp).Row)

ZZFFF9.Activate

ActiveSheet.Range(Cells(1, 1), Cells(AAAZ, 441)).Select

Selection.Copy

ZZFFF12.Activate

ZZFFF12.[a1].Select

ZZFFF12.Paste

ZZFFF12.[a1].Select

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = "Entnahmescheinliste" & ":   &P/&N"

End With

ZZFFF12.Range("a1:py1").EntireColumn.AutoFit

Application.CutCopyMode = False

UserForm1.Hide

Exit Sub

End If

If TextBox1.Value = "ComboBox41" Then

ZZFFF10.Activate

ZZFFF10.[a13].Select

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = "Ent.Sch." & ZZFFF10.[e13] & ":   &P/&N"

End With

ZZFFF10.Range("a1:k1").EntireColumn.AutoFit

Application.CutCopyMode = False

UserForm1.Hide

Exit Sub

End If

ZZFFF11.Activate

ActiveSheet.Rows("1:1").RowHeight = 15.75

ActiveSheet.Rows("2:2").RowHeight = 15.75

Dim SEGG

For Each SEGG In ActiveSheet.Shapes

If Not Intersect(SEGG.TopLeftCell, ActiveCell) Is Nothing Then SEGG.Delete

Next SEGG

ActiveSheet.Range("a1:r100009").Value = ""

ActiveSheet.Range("c3:c3003").NumberFormat = "General"

ActiveSheet.Range("a1:r8").Font.Bold = False

ActiveSheet.DrawingObjects.Delete

If TextBox1.Value = "TextBox52" Or TextBox1.Value = "TextBox53" Then

AAAZ = CDbl(ZZFFF2.Cells(Rows.Count, 1).End(xlUp).Row)

ZZFFF2.Activate

ActiveSheet.Range(Cells(6, 1), Cells(AAAZ, 11)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1] = "Grundbuch"

ZZFFF11.[a2].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 11

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

Exit Sub

End If

If ComboBox47.Value = "" And ComboBox47.BackColor = &HC0E0FF Then

AAAZ = CDbl(ZZFFF8.Cells(Rows.Count, 2).End(xlUp).Row)

ZZFFF8.Activate

ActiveSheet.Range(Cells(1, 2), Cells(AAAZ, 14)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1] = "Kundendatenbank"

ZZFFF11.[a2].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 13

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox47.Value = "Kunde/Artikeln" Then

If ComboBox42.Value = "" Then

MsgBox "Kundennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox42.SetFocus

Exit Sub

End If

AAPP = ComboBox42.ListIndex + 2

ZZFFF11.[a1] = "Kunde/Artikeln"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF8.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF8.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 45 + ((SCHOT - 1) * 2)

If ZZFFF8.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF8.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF8.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 5) > 0 Then

ZZFFF11.Cells(RRRR, 7) = Round(ZZFFF11.Cells(RRRR, 6) / ZZFFF11.Cells(RRRR, 5), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 7

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox47.Value = "Kunde/Lieferanten" Then

If ComboBox42.Value = "" Then

MsgBox "Kundennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox42.SetFocus

Exit Sub

End If

AAPP = ComboBox42.ListIndex + 2

ZZFFF11.[a1] = "Kunde/Lieferanten"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF8.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF8.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Lieferant"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 3000

AAAC = 2567 + ((SCHOT - 1) * 2)

If ZZFFF8.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF7.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF8.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF8.Cells(AAPP, AAAC + 1)

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox47.Value = "" And TextBox1.Value = "ComboBox45" Then

AAAZ = CDbl(ZZFFF7.Cells(Rows.Count, 2).End(xlUp).Row)

ZZFFF7.Activate

ActiveSheet.Range(Cells(1, 2), Cells(AAAZ, 14)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1] = "Lieferantendatenbank"

ZZFFF11.[a2].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 13

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox47.BackColor = &HFFFF& And ComboBox47.Value = "Bestand/Artikeln" Then

If ComboBox45.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox45.SetFocus

Exit Sub

End If

AAPP = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox45.Value, lookat:=xlWhole).Row)

ZZFFF11.[a1] = "Bestand/Artikeln"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 45 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF7.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 5) > 0 Then

ZZFFF11.Cells(RRRR, 7) = Round(ZZFFF11.Cells(RRRR, 6) / ZZFFF11.Cells(RRRR, 5), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 7

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox47.BackColor = &HFFFF& And ComboBox47.Value = "Zugang/Artikeln" Then

If ComboBox45.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox45.SetFocus

Exit Sub

End If

AAPP = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox45.Value, lookat:=xlWhole).Row)

ZZFFF11.[a1] = "Zugang/Artikeln"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 6664 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF7.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 5) > 0 Then

ZZFFF11.Cells(RRRR, 7) = Round(ZZFFF11.Cells(RRRR, 6) / ZZFFF11.Cells(RRRR, 5), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 7

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox47.BackColor = &HFFFF& And ComboBox47.Value = "Entnahme/Artikeln" Then

If ComboBox45.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox45.SetFocus

Exit Sub

End If

AAPP = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox45.Value, lookat:=xlWhole).Row)

ZZFFF11.[a1] = "Entnahme/Artikeln"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 9186 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF7.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 5) > 0 Then

ZZFFF11.Cells(RRRR, 7) = Round(ZZFFF11.Cells(RRRR, 6) / ZZFFF11.Cells(RRRR, 5), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 7

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox47.BackColor = &HFFFF& And ComboBox47.Value = "Lieferant/Lagerplätze" Then

If ComboBox45.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox45.SetFocus

Exit Sub

End If

AAPP = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox45.Value, lookat:=xlWhole).Row)

ZZFFF11.[a1] = "Lieferant/Lagerplätze"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Lagerplatz"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 2047

AAAC = 2567 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF5.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF7.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(AAPP, AAAC + 1)

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox47.BackColor = &HFFFF& And ComboBox47.Value = "Lieferant/Artikel/Lagerplätze" Then

If ComboBox45.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox45.SetFocus

Exit Sub

End If

If ComboBox48.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox48.SetFocus

Exit Sub

End If

AAPP = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox45.Value, lookat:=xlWhole).Row)

ZZFFF11.[a1] = ComboBox45.Value & "_" & ComboBox48.Value & "/Lagerplätze"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

AAPP = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox48.Value, lookat:=xlWhole).Row)

AAAR = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox45.Value, lookat:=xlWhole).Row)

For SCHOT = 2 To 4

ZZFFF11.Cells(SCHOT + 8, 1) = ZZFFF3.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT + 8, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT + 8, 2) = ZZFFF3.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Lagerplatz"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Preis"

ZZFFF11.[f2].Font.Bold = True

AAAZ = ZZFFF3.Cells(AAPP, 16383) + AAAR - 2

AAAC = ZZFFF3.Cells(AAPP, 16384)

RRRR = 2

For SCHOT = 0 To 2046

If ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2)) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF5.Cells(SCHOT + 2, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2))

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2) + 1)

If ZZFFF11.Cells(RRRR, 4) > 0 Then

ZZFFF11.Cells(RRRR, 6) = Round(ZZFFF11.Cells(RRRR, 5) / ZZFFF11.Cells(RRRR, 4), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox47.BackColor = &HFFFFC0 And ComboBox47.Value = "" Then

AAAZ = CDbl(ZZFFF3.Cells(Rows.Count, 2).End(xlUp).Row)

ZZFFF3.Activate

ActiveSheet.Range(Cells(1, 2), Cells(AAAZ, 8)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1] = "Aktueller Bestand Art."

ZZFFF11.[a2].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

ZZFFF11.[h2] = "Stand"

ZZFFF11.[h2].Font.Bold = True

For SCHOT = 3 To 1263

If ZZFFF11.Cells(SCHOT, 5) < ZZFFF11.Cells(SCHOT, 4) Then

ZZFFF11.Cells(SCHOT, 8) = "Melden!"

End If

Next SCHOT

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 8

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox47.Value = "Artikelkonto" Then

If ComboBox43.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox43.SetFocus

Exit Sub

End If

ZZFFF4.Activate

ActiveSheet.Range(Cells(1, 1), Cells(7, 1)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1].Select

ZZFFF11.Paste

AAPP = ComboBox43.ListIndex + 2

AAAC = (AAPP - 2) * 7 + 2

AAAZ = CDbl(ZZFFF4.Cells(Rows.Count, AAAC).End(xlUp).Row)

ZZFFF4.Activate

ZZFFF4.Range(Cells(1, AAAC), Cells(AAAZ, AAAC + 6)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[b1].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

ZZFFF11.Cells(1, 2) = ZZFFF3.Cells(AAPP, 2)

ZZFFF11.Cells(2, 2) = ZZFFF3.Cells(AAPP, 3)

ZZFFF11.Cells(3, 2) = ZZFFF3.Cells(AAPP, 4)

ZZFFF11.Cells(7, 2) = ZZFFF3.Cells(AAPP, 5)

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b1] & ":    &P/&N"

End With

For SCHOT = 1 To 8

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox47.BackColor = &HFFFFC0 And ComboBox47.Value = "Zugang" Then

ZZFFF11.[a1] = "Art_Zugang"

ZZFFF11.[a2] = "Artikelnummer"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[b2] = "Bezeichnung"

ZZFFF11.[b2].Font.Bold = True

ZZFFF11.[c2] = "Zugang Menge"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Zugang Wert"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Zugang Preis"

ZZFFF11.[e2].Font.Bold = True

RRRR = 2

For SCHOT = 2 To 1261

If ZZFFF3.Cells(SCHOT, 13) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 1) = ZZFFF3.Cells(SCHOT, 2)

ZZFFF11.Cells(RRRR, 2) = ZZFFF3.Cells(SCHOT, 3)

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT, 13)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT, 14)

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(SCHOT, 15)

End If

Next SCHOT

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox47.BackColor = &HFFFFC0 And ComboBox47.Value = "Entnahme" Then

ZZFFF11.[a1] = "Art_Entnahme"

ZZFFF11.[a2] = "Artikelnummer"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[b2] = "Bezeichnung"

ZZFFF11.[b2].Font.Bold = True

ZZFFF11.[c2] = "Entnahme Menge"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Entnahme Wert"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Entnahme Preis"

ZZFFF11.[e2].Font.Bold = True

RRRR = 2

For SCHOT = 2 To 1261

If ZZFFF3.Cells(SCHOT, 17) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 1) = ZZFFF3.Cells(SCHOT, 2)

ZZFFF11.Cells(RRRR, 2) = ZZFFF3.Cells(SCHOT, 3)

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT, 17)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT, 18)

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(SCHOT, 19)

End If

Next SCHOT

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox47.Value = "Artikel/Lagerplätze" Then

If ComboBox43.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox43.SetFocus

Exit Sub

End If

ZZFFF11.[a1] = "Artikel/Lagerplätze"

ZZFFF11.[a2] = "Artikelnummer:"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[a3] = "Bezeichnung:"

ZZFFF11.[a3].Font.Bold = True

ZZFFF11.[a4] = "Einheit:"

ZZFFF11.[a4].Font.Bold = True

ZZFFF11.[c2] = "Lagerplatz"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Preis"

ZZFFF11.[f2].Font.Bold = True

AAPP = ComboBox43.ListIndex + 2

ZZFFF11.[b2] = ZZFFF3.Cells(AAPP, 2)

ZZFFF11.[b3] = ZZFFF3.Cells(AAPP, 3)

ZZFFF11.[b4] = ZZFFF3.Cells(AAPP, 4)

RRRR = 2

For SCHOT = 1 To 2047

AAAC = 44 + ((SCHOT - 1) * 2)

If ZZFFF3.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF5.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 4) > 0 Then

ZZFFF11.Cells(RRRR, 6) = Round(ZZFFF11.Cells(RRRR, 5) / ZZFFF11.Cells(RRRR, 4), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox47.Value = "Artikel/Lieferanten" Then

If ComboBox43.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox43.SetFocus

Exit Sub

End If

ZZFFF11.[a1] = "Artikel/Lieferanten"

ZZFFF11.[a2] = "Artikelnummer:"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[a3] = "Bezeichnung:"

ZZFFF11.[a3].Font.Bold = True

ZZFFF11.[a4] = "Einheit:"

ZZFFF11.[a4].Font.Bold = True

ZZFFF11.[c2] = "Lieferant"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Preis"

ZZFFF11.[f2].Font.Bold = True

AAPP = ComboBox43.ListIndex + 2

ZZFFF11.[b2] = ZZFFF3.Cells(AAPP, 2)

ZZFFF11.[b3] = ZZFFF3.Cells(AAPP, 3)

ZZFFF11.[b4] = ZZFFF3.Cells(AAPP, 4)

AAAC = (AAPP - 2) * 2 + 45

RRRR = 2

For SCHOT = 2 To 3001

If ZZFFF7.Cells(SCHOT, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF7.Cells(SCHOT, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF7.Cells(SCHOT, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(SCHOT, AAAC + 1)

If ZZFFF11.Cells(RRRR, 4) > 0 Then

ZZFFF11.Cells(RRRR, 6) = Round(ZZFFF11.Cells(RRRR, 5) / ZZFFF11.Cells(RRRR, 4), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox47.Value = "Artikel/Lieferant/Lagerplätze" Then

If ComboBox43.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox43.SetFocus

Exit Sub

End If

If ComboBox48.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox48.SetFocus

Exit Sub

End If

AAPP = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox48.Value, lookat:=xlWhole).Row)

ZZFFF11.[a1] = ComboBox43.Value & "_" & ComboBox48.Value & "/Lagerplätze"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

TextBox2.Value = ""

AAAZ = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox48.Value, lookat:=xlWhole).Row)

TextBox2.Value = AAAZ

AAAR = CLng(TextBox2.Value)

AAPP = ComboBox43.ListIndex + 2

For SCHOT = 2 To 4

ZZFFF11.Cells(SCHOT + 8, 1) = ZZFFF3.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT + 8, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT + 8, 2) = ZZFFF3.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Lagerplatz"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Preis"

ZZFFF11.[f2].Font.Bold = True

AAAZ = ZZFFF3.Cells(AAPP, 16383) + AAAR - 2

AAAC = ZZFFF3.Cells(AAPP, 16384)

RRRR = 2

For SCHOT = 0 To 2046

If ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2)) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF5.Cells(SCHOT + 2, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2))

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2) + 1)

If ZZFFF11.Cells(RRRR, 4) > 0 Then

ZZFFF11.Cells(RRRR, 6) = Round(ZZFFF11.Cells(RRRR, 5) / ZZFFF11.Cells(RRRR, 4), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox47.BackColor = &HC0FFC0 And ComboBox47.Value = "" Then

AAAZ = CDbl(ZZFFF5.Cells(Rows.Count, 2).End(xlUp).Row)

ZZFFF5.Activate

ActiveSheet.Range(Cells(1, 2), Cells(AAAZ, 4)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1] = "Aktueller Bestand LP"

ZZFFF11.[a2].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 3

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox47.Value = "Lagerplatzkonto" Then

If ComboBox46.Value = "" Then

MsgBox "Lagerplatz ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox46.SetFocus

Exit Sub

End If

ZZFFF6.Activate

ActiveSheet.Range(Cells(1, 1), Cells(3, 1)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1].Select

ZZFFF11.Paste

AAPP = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox46.Value, lookat:=xlWhole).Row)

AAAC = (AAPP - 2) * 8 + 2

AAAZ = CDbl(ZZFFF6.Cells(Rows.Count, AAAC).End(xlUp).Row)

ZZFFF6.Activate

ZZFFF6.Range(Cells(1, AAAC), Cells(AAAZ, AAAC + 7)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[b1].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

ZZFFF11.Cells(1, 2) = ComboBox46.Value

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b1] & ":    &P/&N"

End With

For SCHOT = 1 To 9

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox47.Value = "Lagerplatz/Artikeln" Then

If ComboBox46.Value = "" Then

MsgBox "Lagerplatz ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox46.SetFocus

Exit Sub

End If

ZZFFF11.[a1] = "Lagerplatz/Artikeln"

ZZFFF11.[a2] = "Lagerplatz:"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[b2] = ComboBox46.Value

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

AAPP = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox46.Value, lookat:=xlWhole).Row)

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 7 + ((SCHOT - 1) * 2)

If ZZFFF5.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF5.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF5.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 5) > 0 Then

ZZFFF11.Cells(RRRR, 7) = Round(ZZFFF11.Cells(RRRR, 6) / ZZFFF11.Cells(RRRR, 5), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 7

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox47.Value = "Lagerplatz/Lieferanten" Then

If ComboBox46.Value = "" Then

MsgBox "Lagerplatz ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox46.SetFocus

Exit Sub

End If

ZZFFF11.[a1] = "Lagerplatz/Lieferanten"

ZZFFF11.[a2] = "Lagerplatz:"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[b2] = ComboBox46.Value

ZZFFF11.[c2] = "Lief.-Nr. "

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

AAPP = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox46.Value, lookat:=xlWhole).Row)

RRRR = 2

For SCHOT = 1 To 3000

AAAC = 2529 + ((SCHOT - 1) * 2)

If ZZFFF5.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF7.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF5.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF5.Cells(AAPP, AAAC + 1)

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

Exit Sub

End Sub

 

Sub COOUUFAF()

On Error GoTo ERR

TBB1.BackColor = &HC0FFFF

TBB2.BackColor = &HC0FFFF

KuNr.Enabled = True

KuNr.BackColor = &HC0FFFF

Dim IC As String

IC = CoB1

 If CoB1 > "" Then

Sheets(IC).Activate

End If

If ActiveSheet.Name <> "Zailer" And ActiveSheet.Name <> "POMO" Then

Dim AAAZ As Variant

Dim AAAC As Variant

POMO.[a2] = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row

POMO.[a3] = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Column

AAAZ = CDbl(POMO.[a2])

AAAC = CDbl(POMO.[a3])

SPALTA1 = ""

SPALTA2 = ""

SPALTA3 = ""

SPALTA4 = ""

SPALTA5 = ""

SPALTA6 = ""

SPALTA7 = ""

SPALTB1 = ""

SPALTB2 = ""

SPALTB3 = ""

SPALTB4 = ""

SPALTB5 = ""

SPALTB6 = ""

SPALTB7 = ""

SPALTC1 = ""

SPALTC2 = ""

SPALTC3 = ""

SPALTC4 = ""

SPALTC5 = ""

SPALTC6 = ""

SPALTC7 = ""

SPALTD1 = ""

SPALTD2 = ""

SPALTD3 = ""

SPALTD4 = ""

SPALTD5 = ""

SPALTD6 = ""

SPALTD7 = ""

SPALTE1 = ""

SPALTE2 = ""

SPALTE3 = ""

SPALTE4 = ""

SPALTE5 = ""

SPALTE6 = ""

SPALTE7 = ""

SPALTF1 = ""

SPALTF2 = ""

SPALTF3 = ""

SPALTF4 = ""

SPALTF5 = ""

SPALTF6 = ""

SPALTF7 = ""

SPALTG1 = ""

SPALTG2 = ""

SPALTG3 = ""

SPALTG4 = ""

SPALTG5 = ""

SPALTG6 = ""

SPALTG7 = ""

SPALTA = ""

SPALTB = ""

SPALTC = ""

SPALTD = ""

SPALTE = ""

SPALTF = ""

SPALTG = ""

KuNr = ""

TBB1.Value = ""

TBB2.Value = ""

TBB3.Value = ""

TBB4.Value = ""

TBB5.Value = ""

TBB6.Value = ""

POMO.[a1] = ""

POMO.[b1] = ""

POMO.[c1] = ""

POMO.[d1] = ""

POMO.[e1] = ""

POMO.[F1] = ""

POMO.[g1] = ""

POMO.[h1] = ""

POMO.[i1] = ""

POMO.[j1] = ""

POMO.[k1] = ""

POMO.[L1] = ""

POMO.[m1] = ""

If POMO.[a2] < 65536 Then

Dim ††† As Variant

If POMO.[a3] = 1 Then

POMO.[a4] = 0

††† = POMO.[a4]

End If

If POMO.[a3] = 7 Then

POMO.[a4] = 6

††† = POMO.[a4]

End If

SPALTA = ActiveSheet.Cells(1, AAAC - †††).Value

SPALTB = ActiveSheet.Cells(1, AAAC + 1).Value

SPALTC = ActiveSheet.Cells(1, AAAC + 2).Value

SPALTD = ActiveSheet.Cells(1, AAAC + 3).Value

SPALTE = ActiveSheet.Cells(1, AAAC + 4).Value

SPALTF = ActiveSheet.Cells(1, AAAC + 5).Value

SPALTG = ActiveSheet.Cells(1, AAAC + 6).Value

If POMO.[a2] > 8 Then

SPALTA1 = ActiveSheet.Cells(AAAZ - 6, AAAC - †††).Value

SPALTB1 = ActiveSheet.Cells(AAAZ - 6, AAAC + 1).Value

SPALTC1 = ActiveSheet.Cells(AAAZ - 6, AAAC + 2).Value

SPALTD1 = ActiveSheet.Cells(AAAZ - 6, AAAC + 3).Value

SPALTE1 = ActiveSheet.Cells(AAAZ - 6, AAAC + 4).Value

SPALTF1 = ActiveSheet.Cells(AAAZ - 6, AAAC + 5).Value

SPALTG1 = ActiveSheet.Cells(AAAZ - 6, AAAC + 6).Value

End If

If POMO.[a2] > 7 Then

SPALTA2 = ActiveSheet.Cells(AAAZ - 5, AAAC - †††).Value

SPALTB2 = ActiveSheet.Cells(AAAZ - 5, AAAC + 1).Value

SPALTC2 = ActiveSheet.Cells(AAAZ - 5, AAAC + 2).Value

SPALTD2 = ActiveSheet.Cells(AAAZ - 5, AAAC + 3).Value

SPALTE2 = ActiveSheet.Cells(AAAZ - 5, AAAC + 4).Value

SPALTF2 = ActiveSheet.Cells(AAAZ - 5, AAAC + 5).Value

SPALTG2 = ActiveSheet.Cells(AAAZ - 5, AAAC + 6).Value

End If

If POMO.[a2] > 6 Then

SPALTA3 = ActiveSheet.Cells(AAAZ - 4, AAAC - †††).Value

SPALTB3 = ActiveSheet.Cells(AAAZ - 4, AAAC + 1).Value

SPALTC3 = ActiveSheet.Cells(AAAZ - 4, AAAC + 2).Value

SPALTD3 = ActiveSheet.Cells(AAAZ - 4, AAAC + 3).Value

SPALTE3 = ActiveSheet.Cells(AAAZ - 4, AAAC + 4).Value

SPALTF3 = ActiveSheet.Cells(AAAZ - 4, AAAC + 5).Value

SPALTG3 = ActiveSheet.Cells(AAAZ - 4, AAAC + 6).Value

End If

If POMO.[a2] > 5 Then

SPALTA4 = ActiveSheet.Cells(AAAZ - 3, AAAC - †††).Value

SPALTB4 = ActiveSheet.Cells(AAAZ - 3, AAAC + 1).Value

SPALTC4 = ActiveSheet.Cells(AAAZ - 3, AAAC + 2).Value

SPALTD4 = ActiveSheet.Cells(AAAZ - 3, AAAC + 3).Value

SPALTE4 = ActiveSheet.Cells(AAAZ - 3, AAAC + 4).Value

SPALTF4 = ActiveSheet.Cells(AAAZ - 3, AAAC + 5).Value

SPALTG4 = ActiveSheet.Cells(AAAZ - 3, AAAC + 6).Value

End If

If POMO.[a2] > 4 Then

SPALTA5 = ActiveSheet.Cells(AAAZ - 2, AAAC - †††).Value

SPALTB5 = ActiveSheet.Cells(AAAZ - 2, AAAC + 1).Value

SPALTC5 = ActiveSheet.Cells(AAAZ - 2, AAAC + 2).Value

SPALTD5 = ActiveSheet.Cells(AAAZ - 2, AAAC + 3).Value

SPALTE5 = ActiveSheet.Cells(AAAZ - 2, AAAC + 4).Value

SPALTF5 = ActiveSheet.Cells(AAAZ - 2, AAAC + 5).Value

SPALTG5 = ActiveSheet.Cells(AAAZ - 2, AAAC + 6).Value

End If

If POMO.[a2] > 3 Then

SPALTA6 = ActiveSheet.Cells(AAAZ - 1, AAAC - †††).Value

SPALTB6 = ActiveSheet.Cells(AAAZ - 1, AAAC + 1).Value

SPALTC6 = ActiveSheet.Cells(AAAZ - 1, AAAC + 2).Value

SPALTD6 = ActiveSheet.Cells(AAAZ - 1, AAAC + 3).Value

SPALTE6 = ActiveSheet.Cells(AAAZ - 1, AAAC + 4).Value

SPALTF6 = ActiveSheet.Cells(AAAZ - 1, AAAC + 5).Value

SPALTG6 = ActiveSheet.Cells(AAAZ - 1, AAAC + 6).Value

End If

If POMO.[a2] > 2 Then

SPALTA7 = ActiveSheet.Cells(AAAZ, AAAC - †††).Value

SPALTB7 = ActiveSheet.Cells(AAAZ, AAAC + 1).Value

SPALTC7 = ActiveSheet.Cells(AAAZ, AAAC + 2).Value

SPALTD7 = ActiveSheet.Cells(AAAZ, AAAC + 3).Value

SPALTE7 = ActiveSheet.Cells(AAAZ, AAAC + 4).Value

SPALTF7 = ActiveSheet.Cells(AAAZ, AAAC + 5).Value

SPALTG7 = ActiveSheet.Cells(AAAZ, AAAC + 6).Value

End If

 End If

 End If

If ActiveSheet.Name <> "Zailer" And ActiveSheet.Name <> "POMO" Then

TANA = ActiveSheet.Name

End If

Exit Sub

ERR:

End Sub

 

 

Private Sub CommandButton34_Click()

On Error Resume Next

ZZFFF11.Activate

ActiveSheet.Rows("1:1").RowHeight = 15.75

ActiveSheet.Rows("2:2").RowHeight = 15.75

Dim SEGG

For Each SEGG In ActiveSheet.Shapes

If Not Intersect(SEGG.TopLeftCell, ActiveCell) Is Nothing Then SEGG.Delete

Next SEGG

ActiveSheet.Range("a1:r100009").Value = ""

ActiveSheet.Range("c3:c3003").NumberFormat = "General"

ActiveSheet.Range("a1:r8").Font.Bold = False

ActiveSheet.DrawingObjects.Delete

Dim DDAATT As String

Dim ZZEELL As Range

Dim SCAAL As Double

Dim AAPP As Long

Dim SCHOT As Long

Dim AAAC As Long

Dim AAAR As Long

Dim RRRR As Long

Dim AAAZ As Long

If ComboBox30.BackColor = &HFFFFFF Then

AAAZ = CDbl(ZZFFF2.Cells(Rows.Count, 1).End(xlUp).Row)

ZZFFF2.Activate

ActiveSheet.Range(Cells(6, 1), Cells(AAAZ, 11)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1] = "Grundbuch"

ZZFFF11.[a2].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 11

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

Exit Sub

End If

If ComboBox30.Value = "" And TextBox1.Value = "ComboBox26" Then

AAAZ = CDbl(ZZFFF7.Cells(Rows.Count, 2).End(xlUp).Row)

ZZFFF7.Activate

ActiveSheet.Range(Cells(1, 2), Cells(AAAZ, 14)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1] = "Lieferantendatenbank"

ZZFFF11.[a2].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 13

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox30.BackColor = &HFFFF& And ComboBox30.Value = "Bestand/Artikeln" Then

If ComboBox26.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox26.SetFocus

Exit Sub

End If

AAPP = ComboBox26.ListIndex + 2

ZZFFF11.[a1] = "Bestand/Artikeln"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 45 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF7.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 5) > 0 Then

ZZFFF11.Cells(RRRR, 7) = Round(ZZFFF11.Cells(RRRR, 6) / ZZFFF11.Cells(RRRR, 5), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 7

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox30.BackColor = &HFFFF& And ComboBox30.Value = "Zugang/Artikeln" Then

If ComboBox26.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox26.SetFocus

Exit Sub

End If

AAPP = ComboBox26.ListIndex + 2

ZZFFF11.[a1] = "Zugang/Artikeln"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 6664 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF7.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 5) > 0 Then

ZZFFF11.Cells(RRRR, 7) = Round(ZZFFF11.Cells(RRRR, 6) / ZZFFF11.Cells(RRRR, 5), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 7

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox30.BackColor = &HFFFF& And ComboBox30.Value = "Entnahme/Artikeln" Then

If ComboBox26.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox26.SetFocus

Exit Sub

End If

AAPP = ComboBox26.ListIndex + 2

ZZFFF11.[a1] = "Entnahme/Artikeln"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 9186 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF7.Cells(AAPP, AAAC + 1)

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox30.BackColor = &HFFFF& And ComboBox30.Value = "Lieferant/Lagerplätze" Then

If ComboBox26.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox26.SetFocus

Exit Sub

End If

AAPP = ComboBox26.ListIndex + 2

ZZFFF11.[a1] = "Lieferant/Lagerplätze"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Lagerplatz"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 2047

AAAC = 2567 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF5.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF7.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(AAPP, AAAC + 1)

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox30.BackColor = &HFFFF& And ComboBox30.Value = "Lieferant/Artikel/Lagerplätze" Then

If ComboBox26.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox26.SetFocus

Exit Sub

End If

If ComboBox31.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox31.SetFocus

Exit Sub

End If

AAPP = ComboBox26.ListIndex + 2

ZZFFF11.[a1] = ComboBox26.Value & "_" & ComboBox31.Value & "/Lagerplätze"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

TextBox2.Value = ""

AAPP = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox31.Value, lookat:=xlWhole).Row)

AAAR = ComboBox26.ListIndex + 2

For SCHOT = 2 To 4

ZZFFF11.Cells(SCHOT + 8, 1) = ZZFFF3.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT + 8, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT + 8, 2) = ZZFFF3.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Lagerplatz"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Preis"

ZZFFF11.[f2].Font.Bold = True

AAAZ = ZZFFF3.Cells(AAPP, 16383) + AAAR - 2

AAAC = ZZFFF3.Cells(AAPP, 16384)

RRRR = 2

For SCHOT = 0 To 2046

If ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2)) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF5.Cells(SCHOT + 2, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2))

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2) + 1)

If ZZFFF11.Cells(RRRR, 4) > 0 Then

ZZFFF11.Cells(RRRR, 6) = Round(ZZFFF11.Cells(RRRR, 5) / ZZFFF11.Cells(RRRR, 4), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox30.BackColor = &HFFFFC0 And ComboBox30.Value = "" Then

AAAZ = CDbl(ZZFFF3.Cells(Rows.Count, 2).End(xlUp).Row)

ZZFFF3.Activate

ActiveSheet.Range(Cells(1, 2), Cells(AAAZ, 8)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1] = "Aktueller Bestand Art."

ZZFFF11.[a2].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

ZZFFF11.[h2] = "Stand"

ZZFFF11.[h2].Font.Bold = True

For SCHOT = 3 To 1263

If ZZFFF11.Cells(SCHOT, 5) < ZZFFF11.Cells(SCHOT, 4) Then

ZZFFF11.Cells(SCHOT, 8) = "Melden!"

End If

Next SCHOT

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 8

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox30.Value = "Artikelkonto" Then

If ComboBox27.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox27.SetFocus

Exit Sub

End If

ZZFFF4.Activate

ActiveSheet.Range(Cells(1, 1), Cells(7, 1)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1].Select

ZZFFF11.Paste

AAPP = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox27.Value, lookat:=xlWhole).Row)

AAAC = (AAPP - 2) * 7 + 2

AAAZ = CDbl(ZZFFF4.Cells(Rows.Count, AAAC).End(xlUp).Row)

ZZFFF4.Activate

ZZFFF4.Range(Cells(1, AAAC), Cells(AAAZ, AAAC + 6)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[b1].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

ZZFFF11.Cells(1, 2) = ZZFFF3.Cells(AAPP, 2)

ZZFFF11.Cells(2, 2) = ZZFFF3.Cells(AAPP, 3)

ZZFFF11.Cells(3, 2) = ZZFFF3.Cells(AAPP, 4)

ZZFFF11.Cells(7, 2) = ZZFFF3.Cells(AAPP, 5)

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b1] & ":    &P/&N"

End With

For SCHOT = 1 To 8

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox30.BackColor = &HFFFFC0 And ComboBox30.Value = "Zugang" Then

ZZFFF11.[a1] = "Art_Zugang"

ZZFFF11.[a2] = "Artikelnummer"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[b2] = "Bezeichnung"

ZZFFF11.[b2].Font.Bold = True

ZZFFF11.[c2] = "Zugang Menge"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Zugang Wert"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Zugang Preis"

ZZFFF11.[e2].Font.Bold = True

RRRR = 2

For SCHOT = 2 To 1261

If ZZFFF3.Cells(SCHOT, 13) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 1) = ZZFFF3.Cells(SCHOT, 2)

ZZFFF11.Cells(RRRR, 2) = ZZFFF3.Cells(SCHOT, 3)

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT, 13)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT, 14)

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(SCHOT, 15)

End If

Next SCHOT

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox30.BackColor = &HFFFFC0 And ComboBox30.Value = "Entnahme" Then

ZZFFF11.[a1] = "Art_Entnahme"

ZZFFF11.[a2] = "Artikelnummer"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[b2] = "Bezeichnung"

ZZFFF11.[b2].Font.Bold = True

ZZFFF11.[c2] = "Entnahme Menge"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Entnahme Wert"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Entnahme Preis"

ZZFFF11.[e2].Font.Bold = True

RRRR = 2

For SCHOT = 2 To 1261

If ZZFFF3.Cells(SCHOT, 17) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 1) = ZZFFF3.Cells(SCHOT, 2)

ZZFFF11.Cells(RRRR, 2) = ZZFFF3.Cells(SCHOT, 3)

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT, 17)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT, 18)

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(SCHOT, 19)

End If

Next SCHOT

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox30.Value = "Artikel/Lagerplätze" Then

If ComboBox27.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox27.SetFocus

Exit Sub

End If

ZZFFF11.[a1] = "Artikel/Lagerplätze"

ZZFFF11.[a2] = "Artikelnummer:"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[a3] = "Bezeichnung:"

ZZFFF11.[a3].Font.Bold = True

ZZFFF11.[a4] = "Einheit:"

ZZFFF11.[a4].Font.Bold = True

ZZFFF11.[c2] = "Lagerplatz"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Preis"

ZZFFF11.[f2].Font.Bold = True

AAPP = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox27.Value, lookat:=xlWhole).Row)

ZZFFF11.[b2] = ZZFFF3.Cells(AAPP, 2)

ZZFFF11.[b3] = ZZFFF3.Cells(AAPP, 3)

ZZFFF11.[b4] = ZZFFF3.Cells(AAPP, 4)

RRRR = 2

For SCHOT = 1 To 2047

AAAC = 44 + ((SCHOT - 1) * 2)

If ZZFFF3.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF5.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 4) > 0 Then

ZZFFF11.Cells(RRRR, 6) = Round(ZZFFF11.Cells(RRRR, 5) / ZZFFF11.Cells(RRRR, 4), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox30.Value = "Artikel/Lieferanten" Then

If ComboBox27.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox27.SetFocus

Exit Sub

End If

ZZFFF11.[a1] = "Artikel/Lieferanten"

ZZFFF11.[a2] = "Artikelnummer:"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[a3] = "Bezeichnung:"

ZZFFF11.[a3].Font.Bold = True

ZZFFF11.[a4] = "Einheit:"

ZZFFF11.[a4].Font.Bold = True

ZZFFF11.[c2] = "Lieferant"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Preis"

ZZFFF11.[f2].Font.Bold = True

AAPP = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox27.Value, lookat:=xlWhole).Row)

ZZFFF11.[b2] = ZZFFF3.Cells(AAPP, 2)

ZZFFF11.[b3] = ZZFFF3.Cells(AAPP, 3)

ZZFFF11.[b4] = ZZFFF3.Cells(AAPP, 4)

AAAC = (AAPP - 2) * 2 + 45

RRRR = 2

For SCHOT = 2 To 3001

If ZZFFF7.Cells(SCHOT, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF7.Cells(SCHOT, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF7.Cells(SCHOT, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(SCHOT, AAAC + 1)

If ZZFFF11.Cells(RRRR, 4) > 0 Then

ZZFFF11.Cells(RRRR, 6) = Round(ZZFFF11.Cells(RRRR, 5) / ZZFFF11.Cells(RRRR, 4), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox30.Value = "Artikel/Lieferant/Lagerplätze" Then

If ComboBox27.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox27.SetFocus

Exit Sub

End If

If ComboBox31.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox31.SetFocus

Exit Sub

End If

AAPP = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox26.Value, lookat:=xlWhole).Row)

ZZFFF11.[a1] = ComboBox27.Value & "_" & ComboBox31.Value & "/Lagerplätze"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

TextBox2.Value = ""

AAAZ = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox31.Value, lookat:=xlWhole).Row)

TextBox2.Value = AAAZ

AAAR = CLng(TextBox2.Value)

AAPP = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox27.Value, lookat:=xlWhole).Row)

For SCHOT = 2 To 4

ZZFFF11.Cells(SCHOT + 8, 1) = ZZFFF3.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT + 8, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT + 8, 2) = ZZFFF3.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Lagerplatz"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Preis"

ZZFFF11.[f2].Font.Bold = True

AAAZ = ZZFFF3.Cells(AAPP, 16383) + AAAR - 2

AAAC = ZZFFF3.Cells(AAPP, 16384)

RRRR = 2

For SCHOT = 0 To 2046

If ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2)) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF5.Cells(SCHOT + 2, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2))

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2) + 1)

If ZZFFF11.Cells(RRRR, 4) > 0 Then

ZZFFF11.Cells(RRRR, 6) = Round(ZZFFF11.Cells(RRRR, 5) / ZZFFF11.Cells(RRRR, 4), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox30.BackColor = &HC0FFC0 And ComboBox30.Value = "" Then

AAAZ = CDbl(ZZFFF5.Cells(Rows.Count, 2).End(xlUp).Row)

ZZFFF5.Activate

ActiveSheet.Range(Cells(1, 2), Cells(AAAZ, 4)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1] = "Aktueller Bestand LP"

ZZFFF11.[a2].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 3

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox30.Value = "Lagerplatzkonto" Then

If ComboBox29.Value = "" Then

MsgBox "Lagerplatz ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox29.SetFocus

Exit Sub

End If

ZZFFF6.Activate

ActiveSheet.Range(Cells(1, 1), Cells(3, 1)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1].Select

ZZFFF11.Paste

AAPP = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox29.Value, lookat:=xlWhole).Row)

AAAC = (AAPP - 2) * 8 + 2

AAAZ = CDbl(ZZFFF6.Cells(Rows.Count, AAAC).End(xlUp).Row)

ZZFFF6.Activate

ZZFFF6.Range(Cells(1, AAAC), Cells(AAAZ, AAAC + 7)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[b1].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

ZZFFF11.Cells(1, 2) = ComboBox29.Value

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b1] & ":    &P/&N"

End With

For SCHOT = 1 To 9

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox30.Value = "Lagerplatz/Artikeln" Then

If ComboBox29.Value = "" Then

MsgBox "Lagerplatz ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox29.SetFocus

Exit Sub

End If

ZZFFF11.[a1] = "Lagerplatz/Artikeln"

ZZFFF11.[a2] = "Lagerplatz:"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[b2] = ComboBox29.Value

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

AAPP = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox29.Value, lookat:=xlWhole).Row)

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 7 + ((SCHOT - 1) * 2)

If ZZFFF5.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF5.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF5.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 5) > 0 Then

ZZFFF11.Cells(RRRR, 7) = Round(ZZFFF11.Cells(RRRR, 6) / ZZFFF11.Cells(RRRR, 5), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 7

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox30.Value = "Lagerplatz/Lieferanten" Then

If ComboBox29.Value = "" Then

MsgBox "Lagerplatz ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox29.SetFocus

Exit Sub

End If

ZZFFF11.[a1] = "Lagerplatz/Lieferanten"

ZZFFF11.[a2] = "Lagerplatz:"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[b2] = ComboBox29.Value

ZZFFF11.[c2] = "Lief.-Nr. "

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

AAPP = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox29.Value, lookat:=xlWhole).Row)

RRRR = 2

For SCHOT = 1 To 3000

AAAC = 2529 + ((SCHOT - 1) * 2)

If ZZFFF5.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF7.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF5.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF5.Cells(AAPP, AAAC + 1)

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

Exit Sub

End Sub

 

Private Sub CommandButton30_Click()

On Error Resume Next

ZZFFF11.Activate

ActiveSheet.Rows("1:1").RowHeight = 15.75

ActiveSheet.Rows("2:2").RowHeight = 15.75

Dim SEGG

For Each SEGG In ActiveSheet.Shapes

If Not Intersect(SEGG.TopLeftCell, ActiveCell) Is Nothing Then SEGG.Delete

Next SEGG

ActiveSheet.Range("a1:r100009").Value = ""

ActiveSheet.Range("c3:c3003").NumberFormat = "General"

ActiveSheet.Range("a1:r8").Font.Bold = False

ActiveSheet.DrawingObjects.Delete

Dim DDAATT As String

Dim ZZEELL As Range

Dim SCAAL As Double

Dim AAPP As Long

Dim SCHOT As Long

Dim AAAC As Long

Dim AAAR As Long

Dim RRRR As Long

Dim AAAZ As Long

If ComboBox23.BackColor = &HFFFFFF Then

AAAZ = CDbl(ZZFFF2.Cells(Rows.Count, 1).End(xlUp).Row)

ZZFFF2.Activate

ActiveSheet.Range(Cells(6, 1), Cells(AAAZ, 11)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1] = "Grundbuch"

ZZFFF11.[a2].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

With ActiveSheet.PageSetup

     .PrintTitleRows = ""

      .PrintTitleColumns = ""

    End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 11

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

Exit Sub

End If

If ComboBox23.Value = "" And TextBox1.Value = "ComboBox17" Then

AAAZ = CDbl(ZZFFF7.Cells(Rows.Count, 2).End(xlUp).Row)

ZZFFF7.Activate

ActiveSheet.Range(Cells(1, 2), Cells(AAAZ, 14)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1] = "Lieferantendatenbank"

ZZFFF11.[a2].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 13

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox23.BackColor = &HFFFF& And ComboBox23.Value = "Bestand/Artikeln" Then

If ComboBox17.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox17.SetFocus

Exit Sub

End If

AAPP = ComboBox17.ListIndex + 2

ZZFFF11.[a1] = "Bestand/Artikeln"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 45 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF7.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 5) > 0 Then

ZZFFF11.Cells(RRRR, 7) = Round(ZZFFF11.Cells(RRRR, 6) / ZZFFF11.Cells(RRRR, 5), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 7

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox23.BackColor = &HFFFF& And ComboBox23.Value = "Zugang/Artikeln" Then

If ComboBox17.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox17.SetFocus

Exit Sub

End If

AAPP = ComboBox17.ListIndex + 2

ZZFFF11.[a1] = "Zugang/Artikeln"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 6664 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF7.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 5) > 0 Then

ZZFFF11.Cells(RRRR, 7) = Round(ZZFFF11.Cells(RRRR, 6) / ZZFFF11.Cells(RRRR, 5), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 7

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox23.BackColor = &HFFFF& And ComboBox23.Value = "Entnahme/Artikeln" Then

If ComboBox17.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox17.SetFocus

Exit Sub

End If

AAPP = ComboBox17.ListIndex + 2

ZZFFF11.[a1] = "Entnahme/Artikeln"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 9186 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF7.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 5) > 0 Then

ZZFFF11.Cells(RRRR, 7) = Round(ZZFFF11.Cells(RRRR, 6) / ZZFFF11.Cells(RRRR, 5), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 7

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox23.BackColor = &HFFFF& And ComboBox23.Value = "Lieferant/Lagerplätze" Then

If ComboBox17.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox17.SetFocus

Exit Sub

End If

AAPP = ComboBox17.ListIndex + 2

ZZFFF11.[a1] = "Lieferant/Lagerplätze"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Lagerplatz"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

RRRR = 2

For SCHOT = 1 To 2047

AAAC = 2567 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF5.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF7.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(AAPP, AAAC + 1)

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox23.BackColor = &HFFFF& And ComboBox23.Value = "Lieferant/Artikel/Lagerplätze" Then

If ComboBox17.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox17.SetFocus

Exit Sub

End If

If ComboBox24.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox24.SetFocus

Exit Sub

End If

AAPP = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox17.Value, lookat:=xlWhole).Row)

ZZFFF11.[a1] = ComboBox17.Value & "_" & ComboBox24.Value & "/Lagerplätze"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

AAPP = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox24.Value, lookat:=xlWhole).Row)

AAAR = ComboBox17.ListIndex + 2

For SCHOT = 2 To 4

ZZFFF11.Cells(SCHOT + 8, 1) = ZZFFF3.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT + 8, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT + 8, 2) = ZZFFF3.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Lagerplatz"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Preis"

ZZFFF11.[f2].Font.Bold = True

AAAZ = ZZFFF3.Cells(AAPP, 16383) + AAAR - 2

AAAC = ZZFFF3.Cells(AAPP, 16384)

RRRR = 2

For SCHOT = 0 To 2046

If ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2)) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF5.Cells(SCHOT + 2, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2))

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2) + 1)

If ZZFFF11.Cells(RRRR, 4) > 0 Then

ZZFFF11.Cells(RRRR, 6) = Round(ZZFFF11.Cells(RRRR, 5) / ZZFFF11.Cells(RRRR, 4), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox23.BackColor = &HFFFFC0 And ComboBox23.Value = "" Then

AAAZ = CDbl(ZZFFF3.Cells(Rows.Count, 2).End(xlUp).Row)

ZZFFF3.Activate

ActiveSheet.Range(Cells(1, 2), Cells(AAAZ, 8)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1] = "Aktueller Bestand Art."

ZZFFF11.[a2].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

ZZFFF11.[h2] = "Stand"

ZZFFF11.[h2].Font.Bold = True

For SCHOT = 3 To 1263

If ZZFFF11.Cells(SCHOT, 5) < ZZFFF11.Cells(SCHOT, 4) Then

ZZFFF11.Cells(SCHOT, 8) = "Melden!"

End If

Next SCHOT

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 8

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox23.Value = "Artikelkonto" Then

If ComboBox18.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox18.SetFocus

Exit Sub

End If

ZZFFF4.Activate

ActiveSheet.Range(Cells(1, 1), Cells(7, 1)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1].Select

ZZFFF11.Paste

AAPP = ComboBox18.ListIndex + 2

AAAC = (AAPP - 2) * 7 + 2

AAAZ = CDbl(ZZFFF4.Cells(Rows.Count, AAAC).End(xlUp).Row)

ZZFFF4.Activate

ZZFFF4.Range(Cells(1, AAAC), Cells(AAAZ, AAAC + 6)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[b1].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

ZZFFF11.Cells(1, 2) = ZZFFF3.Cells(AAPP, 2)

ZZFFF11.Cells(2, 2) = ZZFFF3.Cells(AAPP, 3)

ZZFFF11.Cells(3, 2) = ZZFFF3.Cells(AAPP, 4)

ZZFFF11.Cells(7, 2) = ZZFFF3.Cells(AAPP, 5)

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b1] & ":    &P/&N"

End With

For SCHOT = 1 To 8

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox23.BackColor = &HFFFFC0 And ComboBox23.Value = "Zugang" Then

ZZFFF11.[a1] = "Art_Zugang"

ZZFFF11.[a2] = "Artikelnummer"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[b2] = "Bezeichnung"

ZZFFF11.[b2].Font.Bold = True

ZZFFF11.[c2] = "Zugang Menge"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Zugang Wert"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Zugang Preis"

ZZFFF11.[e2].Font.Bold = True

RRRR = 2

For SCHOT = 2 To 1261

If ZZFFF3.Cells(SCHOT, 13) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 1) = ZZFFF3.Cells(SCHOT, 2)

ZZFFF11.Cells(RRRR, 2) = ZZFFF3.Cells(SCHOT, 3)

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT, 13)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT, 14)

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(SCHOT, 15)

End If

Next SCHOT

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox23.BackColor = &HFFFFC0 And ComboBox23.Value = "Entnahme" Then

ZZFFF11.[a1] = "Art_Entnahme"

ZZFFF11.[a2] = "Artikelnummer"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[b2] = "Bezeichnung"

ZZFFF11.[b2].Font.Bold = True

ZZFFF11.[c2] = "Entnahme Menge"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Entnahme Wert"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Entnahme Preis"

ZZFFF11.[e2].Font.Bold = True

RRRR = 2

For SCHOT = 2 To 1261

If ZZFFF3.Cells(SCHOT, 17) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 1) = ZZFFF3.Cells(SCHOT, 2)

ZZFFF11.Cells(RRRR, 2) = ZZFFF3.Cells(SCHOT, 3)

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT, 17)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT, 18)

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(SCHOT, 19)

End If

Next SCHOT

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox23.Value = "Artikel/Lagerplätze" Then

If ComboBox18.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox18.SetFocus

Exit Sub

End If

ZZFFF11.[a1] = "Artikel/Lagerplätze"

ZZFFF11.[a2] = "Artikelnummer:"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[a3] = "Bezeichnung:"

ZZFFF11.[a3].Font.Bold = True

ZZFFF11.[a4] = "Einheit:"

ZZFFF11.[a4].Font.Bold = True

ZZFFF11.[c2] = "Lagerplatz"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Preis"

ZZFFF11.[f2].Font.Bold = True

AAPP = ComboBox18.ListIndex + 2

ZZFFF11.[b2] = ZZFFF3.Cells(AAPP, 2)

ZZFFF11.[b3] = ZZFFF3.Cells(AAPP, 3)

ZZFFF11.[b4] = ZZFFF3.Cells(AAPP, 4)

RRRR = 2

For SCHOT = 1 To 2047

AAAC = 44 + ((SCHOT - 1) * 2)

If ZZFFF3.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF5.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 4) > 0 Then

ZZFFF11.Cells(RRRR, 6) = Round(ZZFFF11.Cells(RRRR, 5) / ZZFFF11.Cells(RRRR, 4), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox23.Value = "Artikel/Lieferanten" Then

If ComboBox18.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox18.SetFocus

Exit Sub

End If

ZZFFF11.[a1] = "Artikel/Lieferanten"

ZZFFF11.[a2] = "Artikelnummer:"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[a3] = "Bezeichnung:"

ZZFFF11.[a3].Font.Bold = True

ZZFFF11.[a4] = "Einheit:"

ZZFFF11.[a4].Font.Bold = True

ZZFFF11.[c2] = "Lieferant"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Preis"

ZZFFF11.[f2].Font.Bold = True

AAPP = ComboBox18.ListIndex + 2

ZZFFF11.[b2] = ZZFFF3.Cells(AAPP, 2)

ZZFFF11.[b3] = ZZFFF3.Cells(AAPP, 3)

ZZFFF11.[b4] = ZZFFF3.Cells(AAPP, 4)

AAAC = (AAPP - 2) * 2 + 45

RRRR = 2

For SCHOT = 2 To 3001

If ZZFFF7.Cells(SCHOT, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF7.Cells(SCHOT, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF7.Cells(SCHOT, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF7.Cells(SCHOT, AAAC + 1)

If ZZFFF11.Cells(RRRR, 4) > 0 Then

ZZFFF11.Cells(RRRR, 6) = Round(ZZFFF11.Cells(RRRR, 5) / ZZFFF11.Cells(RRRR, 4), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox23.Value = "Artikel/Lieferant/Lagerplätze" Then

If ComboBox18.Value = "" Then

MsgBox "Artikelnummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox18.SetFocus

Exit Sub

End If

If ComboBox24.Value = "" Then

MsgBox "Lieferantennummer ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox24.SetFocus

Exit Sub

End If

AAPP = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox24.Value, lookat:=xlWhole).Row)

ZZFFF11.[a1] = ComboBox18.Value & "_" & ComboBox24.Value & "/Lagerplätze"

For SCHOT = 2 To 9

ZZFFF11.Cells(SCHOT, 1) = ZZFFF7.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT, 2) = ZZFFF7.Cells(AAPP, SCHOT)

Next SCHOT

TextBox2.Value = ""

AAAZ = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox24.Value, lookat:=xlWhole).Row)

TextBox2.Value = AAAZ

AAAR = CLng(TextBox2.Value)

AAPP = ComboBox18.ListIndex + 2

For SCHOT = 2 To 4

ZZFFF11.Cells(SCHOT + 8, 1) = ZZFFF3.Cells(1, SCHOT) & ":"

ZZFFF11.Cells(SCHOT + 8, 1).Font.Bold = True

ZZFFF11.Cells(SCHOT + 8, 2) = ZZFFF3.Cells(AAPP, SCHOT)

Next SCHOT

ZZFFF11.[c2] = "Lagerplatz"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Preis"

ZZFFF11.[f2].Font.Bold = True

AAAZ = ZZFFF3.Cells(AAPP, 16383) + AAAR - 2

AAAC = ZZFFF3.Cells(AAPP, 16384)

RRRR = 2

For SCHOT = 0 To 2046

If ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2)) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF5.Cells(SCHOT + 2, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2))

ZZFFF11.Cells(RRRR, 5) = ZZFFF3.Cells(AAAZ, AAAC + (SCHOT * 2) + 1)

If ZZFFF11.Cells(RRRR, 4) > 0 Then

ZZFFF11.Cells(RRRR, 6) = Round(ZZFFF11.Cells(RRRR, 5) / ZZFFF11.Cells(RRRR, 4), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 6

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

ActiveSheet.Rows("1:1").RowHeight = 62.25

ActiveSheet.[c1].Select

DDAATT = ZZFFF3.Cells(AAPP, 10)

Set ZZEELL = ActiveCell

Select Case Right(DDAATT, 3)

Case "ani", "apng", "bmp", "cht", "cur", "gif", "ico", "jpg", "jpeg", "kml", "png", "rgb", "svg", "svgz", "tif", "tiff", "xbm", "xpm", "JPG", "ANI", "APNG", "BMP", "CHT", "CUR", "GIF", "ICO", "JPEG", "KML", "PNG", "RGB", "SVG", "SVGZ", "TIF", "TIFF", "XBM", "XPM"

ActiveSheet.Pictures.Insert(DDAATT).Select

With Selection.ShapeRange

.Top = ZZEELL.Top

.Left = ZZEELL.Left

SCAAL = WorksheetFunction.Min(ZZEELL.Width / .Width, ZZEELL.Height / .Height)

.Height = .Height * SCAAL

End With

Selection.Placement = xlMoveAndSize

Selection.PrintObject = True

Case Else

MsgBox "Ausgewählter Artikel hat kein Bild!", 48, "http://excel.hpage.de    "

End Select

UserForm1.Hide

End If

If ComboBox23.BackColor = &HC0FFC0 And ComboBox23.Value = "" Then

AAAZ = CDbl(ZZFFF5.Cells(Rows.Count, 2).End(xlUp).Row)

ZZFFF5.Activate

ActiveSheet.Range(Cells(1, 2), Cells(AAAZ, 4)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1] = "Aktueller Bestand LP"

ZZFFF11.[a2].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[a1] & ":    &P/&N"

End With

For SCHOT = 1 To 3

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox23.Value = "Lagerplatzkonto" Then

If ComboBox22.Value = "" Then

MsgBox "Lagerplatz ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox22.SetFocus

Exit Sub

End If

ZZFFF6.Activate

ActiveSheet.Range(Cells(1, 1), Cells(3, 1)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[a1].Select

ZZFFF11.Paste

AAPP = ComboBox22.ListIndex + 2

AAAC = (AAPP - 2) * 8 + 2

AAAZ = CDbl(ZZFFF6.Cells(Rows.Count, AAAC).End(xlUp).Row)

ZZFFF6.Activate

ZZFFF6.Range(Cells(1, AAAC), Cells(AAAZ, AAAC + 7)).Select

Selection.Copy

ZZFFF11.Activate

ZZFFF11.[b1].Select

ZZFFF11.Paste

ZZFFF11.[a1].Select

ZZFFF11.Cells(1, 2) = ComboBox22.Value

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b1] & ":    &P/&N"

End With

For SCHOT = 1 To 9

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox23.Value = "Lagerplatz/Artikeln" Then

If ComboBox22.Value = "" Then

MsgBox "Lagerplatz ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox22.SetFocus

Exit Sub

End If

ZZFFF11.[a1] = "Lagerplatz/Artikeln"

ZZFFF11.[a2] = "Lagerplatz:"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[b2] = ComboBox22.Value

ZZFFF11.[c2] = "Artikel"

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Bezeichnung/Einheit"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Menge"

ZZFFF11.[e2].Font.Bold = True

ZZFFF11.[f2] = "Wert"

ZZFFF11.[f2].Font.Bold = True

ZZFFF11.[g2] = "Preis"

ZZFFF11.[g2].Font.Bold = True

AAPP = ComboBox22.ListIndex + 2

RRRR = 2

For SCHOT = 1 To 1260

AAAC = 7 + ((SCHOT - 1) * 2)

If ZZFFF5.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF3.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF3.Cells(SCHOT + 1, 3) & "_" & ZZFFF3.Cells(SCHOT + 1, 4)

ZZFFF11.Cells(RRRR, 5) = ZZFFF5.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 6) = ZZFFF5.Cells(AAPP, AAAC + 1)

If ZZFFF11.Cells(RRRR, 5) > 0 Then

ZZFFF11.Cells(RRRR, 7) = Round(ZZFFF11.Cells(RRRR, 6) / ZZFFF11.Cells(RRRR, 5), 2)

End If

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 7

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

If ComboBox23.Value = "Lagerplatz/Lieferanten" Then

If ComboBox22.Value = "" Then

MsgBox "Lagerplatz ist nicht ausgewählt!", 48, "http://excel.hpage.de    "

ComboBox22.SetFocus

Exit Sub

End If

ZZFFF11.[a1] = "Lagerplatz/Lieferanten"

ZZFFF11.[a2] = "Lagerplatz:"

ZZFFF11.[a2].Font.Bold = True

ZZFFF11.[b2] = ComboBox22.Value

ZZFFF11.[c2] = "Lief.-Nr. "

ZZFFF11.[c2].Font.Bold = True

ZZFFF11.[d2] = "Menge"

ZZFFF11.[d2].Font.Bold = True

ZZFFF11.[e2] = "Wert"

ZZFFF11.[e2].Font.Bold = True

AAPP = ComboBox22.ListIndex + 2

RRRR = 2

For SCHOT = 1 To 3000

AAAC = 2529 + ((SCHOT - 1) * 2)

If ZZFFF5.Cells(AAPP, AAAC) <> "" Then

RRRR = RRRR + 1

ZZFFF11.Cells(RRRR, 3) = ZZFFF7.Cells(SCHOT + 1, 2)

ZZFFF11.Cells(RRRR, 4) = ZZFFF5.Cells(AAPP, AAAC)

ZZFFF11.Cells(RRRR, 5) = ZZFFF5.Cells(AAPP, AAAC + 1)

End If

Next SCHOT

ZZFFF11.Activate

With ActiveSheet.PageSetup

.PrintTitleRows = ""

.PrintTitleColumns = ""

End With

With ActiveSheet.PageSetup

.RightHeader = ZZFFF11.[b2] & "_" & ZZFFF11.[a1] & ":   &P/&N"

End With

For SCHOT = 1 To 5

ActiveSheet.Cells(Rows.Count, SCHOT).ColumnWidth = 40

ActiveSheet.Cells(Rows.Count, SCHOT).EntireColumn.AutoFit

Next SCHOT

Application.CutCopyMode = False

UserForm1.Hide

End If

Exit Sub

End Sub

 

Private Sub UserForm_Initialize()

On Error GoTo EERR

With UserForm1

.Height = 455

.Width = 757

End With

With Me

.StartUpPosition = 0

.Top = 60

.Left = 250

End With

ZZFFF1.Visible = xlSheetVisible

ZZFFF10.Visible = xlSheetVisible

ZZFFF11.Visible = xlSheetVisible

ZZFFF12.Visible = xlSheetVisible

Label11.Visible = False

Label12.Visible = False

ComboBox3.ListWidth = 180

ComboBox4.ListWidth = 180

ComboBox9.ListWidth = 180

ComboBox10.ListWidth = 180

ComboBox15.ListWidth = 180

ComboBox23.ListWidth = 180

ComboBox24.ListWidth = 180

ComboBox30.ListWidth = 180

ComboBox31.ListWidth = 180

ComboBox38.ListWidth = 180

ComboBox39.ListWidth = 180

ComboBox47.ListWidth = 180

ComboBox48.ListWidth = 180

Call ZZUUFF

If ZZFFF3.Cells(2, 16383) = "" Then

Call VBBV

Call VccV

End If

Exit Sub

EERR:

End Sub

 

Sub ZLIPA1()

On Error GoTo EERR

Dim AAAC As Long

Dim TSCHISLO As Long

If TextBox2.Value = "EintragenAr" Then

TextBox2.Value = ""

For TSCHISLO = 2 To 1262

If ZZFFF3.Cells(TSCHISLO, 2) = "" Then

TextBox2.Value = TSCHISLO

Exit Sub

End If

Next TSCHISLO

End If

If TextBox2.Value = "EintragenLp" Then

TextBox2.Value = ""

For TSCHISLO = 2 To 2049

If ZZFFF5.Cells(TSCHISLO, 2) = "" Then

TextBox2.Value = TSCHISLO

Exit Sub

End If

Next TSCHISLO

End If

If TextBox1.Value = "EintragenLi" Then

TextBox2.Value = ""

For TSCHISLO = 2 To 3002

If ZZFFF7.Cells(TSCHISLO, 2) = "" Then

TextBox2.Value = TSCHISLO

Exit Sub

End If

Next TSCHISLO

End If

If TextBox1.Value = "EintragenKu" Then

TextBox2.Value = ""

For TSCHISLO = 2 To 1048572

If ZZFFF8.Cells(TSCHISLO, 2) = "" Then

TextBox2.Value = TSCHISLO

Exit Sub

End If

Next TSCHISLO

End If

If TextBox1.Value = "CommandButton29" Then

TextBox2.Value = ""

For TSCHISLO = 8 To 1048572

If ZZFFF2.Cells(TSCHISLO, 1) = "" Then

TextBox2.Value = TSCHISLO

Exit Sub

End If

Next TSCHISLO

End If

If TextBox1.Value = "CommandButton33" Then

TextBox2.Value = ""

For TSCHISLO = 8 To 1048572

If ZZFFF2.Cells(TSCHISLO, 1) = "" Then

TextBox2.Value = TSCHISLO

Exit Sub

End If

Next TSCHISLO

End If

If TextBox1.Value = "CommandButton37" Then

TextBox2.Value = ""

For TSCHISLO = 8 To 1048572

If ZZFFF2.Cells(TSCHISLO, 1) = "" Then

TextBox2.Value = TSCHISLO

Exit Sub

End If

Next TSCHISLO

End If

If TextBox1.Value = "ZStobezID" Then

TextBox2.Value = ""

For TSCHISLO = 8 To 1048572

If ZZFFF2.Cells(TSCHISLO, 15) = "" Then

TextBox2.Value = TSCHISLO

Exit Sub

End If

Next TSCHISLO

End If

If TextBox1.Value = "GStobezID" Then

TextBox2.Value = ""

For TSCHISLO = 8 To 1048572

If ZZFFF2.Cells(TSCHISLO, 29) = "" Then

TextBox2.Value = TSCHISLO

Exit Sub

End If

Next TSCHISLO

End If

If TextBox1.Value = "BStobezID" Then

TextBox2.Value = ""

For TSCHISLO = 8 To 1048572

If ZZFFF2.Cells(TSCHISLO, 42) = "" Then

TextBox2.Value = TSCHISLO

Exit Sub

End If

Next TSCHISLO

End If

If TextBox1.Value = "ZeileArtikelkontoIDLeer" Then

TextBox2.Value = ""

AAAC = CLng(TextBox4.Value)

For TSCHISLO = 8 To 1048572

If ZZFFF4.Cells(TSCHISLO, AAAC) = "" Then

TextBox2.Value = TSCHISLO

Exit Sub

End If

Next TSCHISLO

End If

If TextBox1.Value = "ZeileLagerkontoIDLeer" Then

TextBox2.Value = ""

AAAC = CLng(TextBox4.Value)

For TSCHISLO = 5 To 1048572

If ZZFFF6.Cells(TSCHISLO, AAAC) = "" Then

TextBox2.Value = TSCHISLO

Exit Sub

End If

Next TSCHISLO

End If

If TextBox1.Value = "ComboBox40" Then

TextBox2.Value = ""

For TSCHISLO = 2 To 1048572

If ZZFFF9.Cells(TSCHISLO, 1) = "" And ZZFFF9.Cells(TSCHISLO, 2) = "" Then

TextBox2.Value = TSCHISLO

Exit Sub

End If

Next TSCHISLO

End If

If TextBox1.Value = "CommandButton41" Then

TextBox2.Value = ""

For TSCHISLO = 8 To 1048572

If ZZFFF2.Cells(TSCHISLO, 1) = "" Then

TextBox2.Value = TSCHISLO

Exit Sub

End If

Next TSCHISLO

End If

If TextBox1.Value = "EStobezID" Then

TextBox2.Value = ""

For TSCHISLO = 8 To 1048572

If ZZFFF2.Cells(TSCHISLO, 59) = "" Then

TextBox2.Value = TSCHISLO

Exit Sub

End If

Next TSCHISLO

End If

If TextBox1.Value = "SPOS" Then

AAAC = CDbl(TextBox3.Value)

For TSCHISLO = 0 To 40

If ZZFFF9.Cells(AAAC, TSCHISLO * 11 + 2) = "" Then

TextBox2.Value = TSCHISLO + 1

Exit Sub

End If

Next TSCHISLO

End If

Exit Sub

EERR:

End Sub

Sub ZLIPA2()

On Error GoTo EERR

Dim AAPP As Long

Dim AAPP1 As Long

Dim AAPP2 As Long

Dim AAPP3 As Long

Dim AAPP4 As Long

Dim AAAZ As Long

Dim SCHOT As Long

Dim AAAC As Long

Label97.Caption = ""

Label98.Caption = ""

Label99.Caption = ""

Label103.Caption = ""

Label104.Caption = ""

Label105.Caption = ""

Label109.Caption = ""

Label110.Caption = ""

Label111.Caption = ""

If ComboBox17.Value <> "" Then

AAPP1 = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox17.Value, lookat:=xlWhole).Row)

TextBox2.Value = ComboBox20.Value

ComboBox20.Clear

For SCHOT = 1 To 2047

AAAC = 2567 + ((SCHOT - 1) * 2)

If ZZFFF7.Cells(AAPP1, AAAC) <> "" Then

With ComboBox20

.AddItem ZZFFF5.Cells(SCHOT + 1, 2).Value

End With

End If

Next SCHOT

ComboBox20.Value = TextBox2.Value

If ComboBox18.Value <> "" Then

AAPP2 = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox18.Value, lookat:=xlWhole).Row)

Label97.Caption = ZZFFF7.Cells(AAPP1, 45 + (AAPP2 - 2) * 2)

Label98.Caption = ZZFFF7.Cells(AAPP1, 45 + (AAPP2 - 2) * 2 + 1)

If ZZFFF7.Cells(AAPP1, 45 + (AAPP2 - 2) * 2 + 1) > 0 Then

Label99.Caption = Round(ZZFFF7.Cells(AAPP1, 45 + (AAPP2 - 2) * 2 + 1) / ZZFFF7.Cells(AAPP1, 45 + (AAPP2 - 2) * 2), 2)

End If

Label103.Caption = ZZFFF7.Cells(AAPP1, 6664 + (AAPP2 - 2) * 2)

Label104.Caption = ZZFFF7.Cells(AAPP1, 6664 + (AAPP2 - 2) * 2 + 1)

If ZZFFF7.Cells(AAPP1, 6664 + (AAPP2 - 2) * 2 + 1) > 0 Then

Label105.Caption = Round(ZZFFF7.Cells(AAPP1, 6664 + (AAPP2 - 2) * 2 + 1) / ZZFFF7.Cells(AAPP1, 6664 + (AAPP2 - 2) * 2), 2)

End If

Label109.Caption = ZZFFF7.Cells(AAPP1, 9186 + (AAPP2 - 2) * 2)

Label110.Caption = ZZFFF7.Cells(AAPP1, 9186 + (AAPP2 - 2) * 2 + 1)

If ZZFFF7.Cells(AAPP1, 9186 + (AAPP2 - 2) * 2 + 1) > 0 Then

Label111.Caption = Round(ZZFFF7.Cells(AAPP1, 9186 + (AAPP2 - 2) * 2 + 1) / ZZFFF7.Cells(AAPP1, 9186 + (AAPP2 - 2) * 2), 2)

End If

End If

End If

Label100.Caption = ""

Label112.Caption = ""

Label101.Caption = ""

Label102.Caption = ""

Label113.Caption = ""

Label114.Caption = ""

Label106.Caption = ""

Label107.Caption = ""

Label108.Caption = ""

If ComboBox18.Value <> "" Then

AAPP2 = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox18.Value, lookat:=xlWhole).Row)

Label100.Caption = ZZFFF3.Cells(AAPP2, 6)

Label101.Caption = ZZFFF3.Cells(AAPP2, 7)

Label102.Caption = ZZFFF3.Cells(AAPP2, 8)

Label106.Caption = ZZFFF3.Cells(AAPP2, 13)

Label107.Caption = ZZFFF3.Cells(AAPP2, 14)

Label108.Caption = ZZFFF3.Cells(AAPP2, 15)

Label112.Caption = ZZFFF3.Cells(AAPP2, 17)

Label113.Caption = ZZFFF3.Cells(AAPP2, 18)

Label114.Caption = ZZFFF3.Cells(AAPP2, 19)

TextBox2.Value = ComboBox21.Value

ComboBox21.Clear

For SCHOT = 1 To 2047

AAAC = 44 + ((SCHOT - 1) * 2)

If ZZFFF3.Cells(AAPP2, AAAC) <> "" Then

With ComboBox21

.AddItem ZZFFF5.Cells(SCHOT + 1, 2).Value

End With

End If

Next SCHOT

ComboBox21.Value = TextBox2.Value

End If

Label93.Caption = ""

Label96.Caption = ""

Label95.Caption = ""

If ComboBox22.Value <> "" Then

AAAZ = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox22.Value, lookat:=xlWhole).Row)

AAPP1 = ComboBox22.ListIndex + 2

Label92.Caption = ZZFFF5.Cells(AAPP1, 3)

Label94.Caption = ZZFFF5.Cells(AAPP1, 4)

If ComboBox18.Value <> "" Then

AAPP2 = ComboBox18.ListIndex + 2

If ComboBox17.Value <> "" Then

AAPP3 = ComboBox17.ListIndex

AAPP4 = ComboBox22.ListIndex

AAAZ = ZZFFF3.Cells(AAPP2, 16383) + AAPP3

AAAC = ZZFFF3.Cells(AAPP2, 16384)

Label93.Caption = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4))

Label95.Caption = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1)

If ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) <> "" And ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) <> 0 Then

Label96.Caption = Round(ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) / ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)), 2)

End If

End If

End If

End If

Label153.Caption = ""

Label159.Caption = ""

Label165.Caption = ""

Label154.Caption = ""

Label155.Caption = ""

Label160.Caption = ""

Label161.Caption = ""

Label166.Caption = ""

Label167.Caption = ""

If ComboBox26.Value <> "" Then

AAPP1 = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox26.Value, lookat:=xlWhole).Row)

If ComboBox27.Value <> "" Then

AAPP2 = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox27.Value, lookat:=xlWhole).Row)

Label153.Caption = ZZFFF7.Cells(AAPP1, 45 + (AAPP2 - 2) * 2)

Label154.Caption = Round(ZZFFF7.Cells(AAPP1, 45 + (AAPP2 - 2) * 2 + 1), 2)

If ZZFFF7.Cells(AAPP1, 45 + (AAPP2 - 2) * 2 + 1) > 0 Then

Label155.Caption = Round(ZZFFF7.Cells(AAPP1, 45 + (AAPP2 - 2) * 2 + 1) / ZZFFF7.Cells(AAPP1, 45 + (AAPP2 - 2) * 2), 2)

End If

Label159.Caption = ZZFFF7.Cells(AAPP1, 6664 + (AAPP2 - 2) * 2)

Label160.Caption = Round(ZZFFF7.Cells(AAPP1, 6664 + (AAPP2 - 2) * 2 + 1), 2)

If ZZFFF7.Cells(AAPP1, 6664 + (AAPP2 - 2) * 2 + 1) > 0 Then

Label161.Caption = Round(ZZFFF7.Cells(AAPP1, 6664 + (AAPP2 - 2) * 2 + 1) / ZZFFF7.Cells(AAPP1, 6664 + (AAPP2 - 2) * 2), 2)

End If

Label165.Caption = ZZFFF7.Cells(AAPP1, 9186 + (AAPP2 - 2) * 2)

Label166.Caption = Round(ZZFFF7.Cells(AAPP1, 9186 + (AAPP2 - 2) * 2 + 1), 2)

If ZZFFF7.Cells(AAPP1, 9186 + (AAPP2 - 2) * 2 + 1) > 0 Then

Label167.Caption = Round(ZZFFF7.Cells(AAPP1, 9186 + (AAPP2 - 2) * 2 + 1) / ZZFFF7.Cells(AAPP1, 9186 + (AAPP2 - 2) * 2), 2)

End If

End If

End If

Label156.Caption = ""

Label168.Caption = ""

Label157.Caption = ""

Label158.Caption = ""

Label169.Caption = ""

Label170.Caption = ""

Label162.Caption = ""

Label163.Caption = ""

Label164.Caption = ""

If ComboBox27.Value <> "" Then

AAPP2 = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox27.Value, lookat:=xlWhole).Row)

Label156.Caption = ZZFFF3.Cells(AAPP2, 6)

Label157.Caption = Round(ZZFFF3.Cells(AAPP2, 7), 2)

Label158.Caption = Round(ZZFFF3.Cells(AAPP2, 8), 2)

Label162.Caption = ZZFFF3.Cells(AAPP2, 13)

Label163.Caption = Round(ZZFFF3.Cells(AAPP2, 14), 2)

Label164.Caption = Round(ZZFFF3.Cells(AAPP2, 15), 2)

Label168.Caption = ZZFFF3.Cells(AAPP2, 17)

Label169.Caption = Round(ZZFFF3.Cells(AAPP2, 18), 2)

Label170.Caption = Round(ZZFFF3.Cells(AAPP2, 19), 2)

End If

Label149.Caption = ""

Label152.Caption = ""

Label151.Caption = ""

If ComboBox29.Value <> "" Then

AAAZ = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox29.Value, lookat:=xlWhole).Row)

AAPP = AAAZ

Label148.Caption = ZZFFF5.Cells(AAPP, 3)

Label150.Caption = Round(ZZFFF5.Cells(AAPP, 4), 2)

If ComboBox27.Value <> "" Then

AAPP2 = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox27.Value, lookat:=xlWhole).Row)

If ComboBox26.Value <> "" Then

AAPP3 = ComboBox26.ListIndex

AAPP4 = AAAZ - 2

AAAZ = ZZFFF3.Cells(AAPP2, 16383) + AAPP3

AAAC = ZZFFF3.Cells(AAPP2, 16384)

Label149.Caption = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4))

Label151.Caption = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1)

If ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) <> "" And ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) <> 0 Then

Label152.Caption = Round(ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) / ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)), 2)

End If

End If

End If

End If

Label224.Caption = ""

Label236.Caption = ""

Label225.Caption = ""

Label226.Caption = ""

Label237.Caption = ""

Label238.Caption = ""

Label230.Caption = ""

Label231.Caption = ""

Label232.Caption = ""

If ComboBox33.Value <> "" Then

AAPP2 = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox33.Value, lookat:=xlWhole).Row)

Label224.Caption = ZZFFF3.Cells(AAPP2, 6)

Label225.Caption = Round(ZZFFF3.Cells(AAPP2, 7), 2)

Label226.Caption = Round(ZZFFF3.Cells(AAPP2, 8), 2)

Label230.Caption = ZZFFF3.Cells(AAPP2, 13)

Label231.Caption = Round(ZZFFF3.Cells(AAPP2, 14), 2)

Label232.Caption = Round(ZZFFF3.Cells(AAPP2, 15), 2)

Label236.Caption = ZZFFF3.Cells(AAPP2, 17)

Label237.Caption = Round(ZZFFF3.Cells(AAPP2, 18), 2)

Label238.Caption = Round(ZZFFF3.Cells(AAPP2, 19), 2)

End If

Label221.Caption = ""

Label222.Caption = ""

Label223.Caption = ""

Label227.Caption = ""

Label228.Caption = ""

Label229.Caption = ""

Label233.Caption = ""

Label234.Caption = ""

Label235.Caption = ""

If ComboBox35.Value <> "" Then

AAPP1 = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox35.Value, lookat:=xlWhole).Row)

If ComboBox33.Value <> "" Then

AAPP2 = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox33.Value, lookat:=xlWhole).Row)

Label221.Caption = ZZFFF7.Cells(AAPP1, 45 + (AAPP2 - 2) * 2)

Label222.Caption = Round(ZZFFF7.Cells(AAPP1, 45 + (AAPP2 - 2) * 2 + 1), 2)

If ZZFFF7.Cells(AAPP1, 45 + (AAPP2 - 2) * 2 + 1) > 0 Then

Label223.Caption = Round(ZZFFF7.Cells(AAPP1, 45 + (AAPP2 - 2) * 2 + 1) / ZZFFF7.Cells(AAPP1, 45 + (AAPP2 - 2) * 2), 2)

End If

Label227.Caption = ZZFFF7.Cells(AAPP1, 6664 + (AAPP2 - 2) * 2)

Label228.Caption = Round(ZZFFF7.Cells(AAPP1, 6664 + (AAPP2 - 2) * 2 + 1), 2)

If ZZFFF7.Cells(AAPP1, 6664 + (AAPP2 - 2) * 2 + 1) > 0 Then

Label229.Caption = Round(ZZFFF7.Cells(AAPP1, 6664 + (AAPP2 - 2) * 2 + 1) / ZZFFF7.Cells(AAPP1, 6664 + (AAPP2 - 2) * 2), 2)

End If

Label233.Caption = ZZFFF7.Cells(AAPP1, 9186 + (AAPP2 - 2) * 2)

Label234.Caption = Round(ZZFFF7.Cells(AAPP1, 9186 + (AAPP2 - 2) * 2 + 1), 2)

If ZZFFF7.Cells(AAPP1, 9186 + (AAPP2 - 2) * 2 + 1) > 0 Then

Label235.Caption = Round(ZZFFF7.Cells(AAPP1, 9186 + (AAPP2 - 2) * 2 + 1) / ZZFFF7.Cells(AAPP1, 9186 + (AAPP2 - 2) * 2), 2)

End If

End If

End If

Label212.Caption = ""

Label215.Caption = ""

Label214.Caption = ""

If ComboBox36.Value <> "" Then

AAPP1 = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox36.Value, lookat:=xlWhole).Row)

Label211.Caption = ZZFFF5.Cells(AAPP1, 3)

Label213.Caption = Round(ZZFFF5.Cells(AAPP1, 4), 2)

If ComboBox33.Value <> "" Then

AAPP2 = ComboBox33.ListIndex + 2

If ComboBox35.Value <> "" Then

AAPP3 = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox35.Value, lookat:=xlWhole).Row) - 2

AAPP4 = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox36.Value, lookat:=xlWhole).Row) - 2

AAAZ = ZZFFF3.Cells(AAPP2, 16383) + AAPP3

AAAC = ZZFFF3.Cells(AAPP2, 16384)

Label212.Caption = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4))

Label214.Caption = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1)

If ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) <> "" And ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) <> 0 Then

Label215.Caption = Round(ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) / ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)), 2)

End If

End If

End If

End If

Label217.Caption = ""

Label220.Caption = ""

Label219.Caption = ""

If ComboBox37.Value <> "" Then

AAPP1 = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox37.Value, lookat:=xlWhole).Row)

Label216.Caption = ZZFFF5.Cells(AAPP1, 3)

Label218.Caption = Round(ZZFFF5.Cells(AAPP1, 4), 2)

If ComboBox33.Value <> "" Then

AAPP2 = ComboBox33.ListIndex + 2

If ComboBox35.Value <> "" Then

AAPP3 = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox35.Value, lookat:=xlWhole).Row) - 2

AAPP4 = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox37.Value, lookat:=xlWhole).Row) - 2

AAAZ = ZZFFF3.Cells(AAPP2, 16383) + AAPP3

AAAC = ZZFFF3.Cells(AAPP2, 16384)

Label217.Caption = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4))

Label219.Caption = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1)

If ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) <> "" And ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) <> 0 Then

Label220.Caption = Round(ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) / ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)), 2)

End If

End If

End If

End If

Label290.Caption = ""

Label302.Caption = ""

Label291.Caption = ""

Label292.Caption = ""

Label303.Caption = ""

Label304.Caption = ""

Label296.Caption = ""

Label297.Caption = ""

Label298.Caption = ""

If ComboBox43.Value <> "" Then

AAPP2 = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox43.Value, lookat:=xlWhole).Row)

Label290.Caption = ZZFFF3.Cells(AAPP2, 6)

Label291.Caption = Round(ZZFFF3.Cells(AAPP2, 7), 2)

Label292.Caption = Round(ZZFFF3.Cells(AAPP2, 8), 2)

Label296.Caption = ZZFFF3.Cells(AAPP2, 13)

Label297.Caption = Round(ZZFFF3.Cells(AAPP2, 14), 2)

Label298.Caption = Round(ZZFFF3.Cells(AAPP2, 15), 2)

Label302.Caption = ZZFFF3.Cells(AAPP2, 17)

Label303.Caption = Round(ZZFFF3.Cells(AAPP2, 18), 2)

Label304.Caption = Round(ZZFFF3.Cells(AAPP2, 19), 2)

End If

Label287.Caption = ""

Label288.Caption = ""

Label289.Caption = ""

Label293.Caption = ""

Label294.Caption = ""

Label295.Caption = ""

Label299.Caption = ""

Label300.Caption = ""

Label301.Caption = ""

If ComboBox45.Value <> "" Then

AAPP1 = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox45.Value, lookat:=xlWhole).Row)

If ComboBox43.Value <> "" Then

AAPP2 = CDbl(ZZFFF3.Range("b2:b1261").Cells.Find(What:=ComboBox43.Value, lookat:=xlWhole).Row)

Label287.Caption = ZZFFF7.Cells(AAPP1, 45 + (AAPP2 - 2) * 2)

Label288.Caption = Round(ZZFFF7.Cells(AAPP1, 45 + (AAPP2 - 2) * 2 + 1), 2)

If ZZFFF7.Cells(AAPP1, 45 + (AAPP2 - 2) * 2 + 1) > 0 Then

Label289.Caption = Round(ZZFFF7.Cells(AAPP1, 45 + (AAPP2 - 2) * 2 + 1) / ZZFFF7.Cells(AAPP1, 45 + (AAPP2 - 2) * 2), 2)

End If

Label293.Caption = ZZFFF7.Cells(AAPP1, 6664 + (AAPP2 - 2) * 2)

Label294.Caption = Round(ZZFFF7.Cells(AAPP1, 6664 + (AAPP2 - 2) * 2 + 1), 2)

If ZZFFF7.Cells(AAPP1, 6664 + (AAPP2 - 2) * 2 + 1) > 0 Then

Label295.Caption = Round(ZZFFF7.Cells(AAPP1, 6664 + (AAPP2 - 2) * 2 + 1) / ZZFFF7.Cells(AAPP1, 6664 + (AAPP2 - 2) * 2), 2)

End If

Label299.Caption = ZZFFF7.Cells(AAPP1, 9186 + (AAPP2 - 2) * 2)

Label300.Caption = Round(ZZFFF7.Cells(AAPP1, 9186 + (AAPP2 - 2) * 2 + 1), 2)

If ZZFFF7.Cells(AAPP1, 9186 + (AAPP2 - 2) * 2 + 1) > 0 Then

Label301.Caption = Round(ZZFFF7.Cells(AAPP1, 9186 + (AAPP2 - 2) * 2 + 1) / ZZFFF7.Cells(AAPP1, 9186 + (AAPP2 - 2) * 2), 2)

End If

End If

End If

Label283.Caption = ""

Label286.Caption = ""

Label285.Caption = ""

If ComboBox46.Value <> "" Then

AAPP1 = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox46.Value, lookat:=xlWhole).Row)

Label282.Caption = ZZFFF5.Cells(AAPP1, 3)

Label284.Caption = Round(ZZFFF5.Cells(AAPP1, 4), 2)

If ComboBox43.Value <> "" Then

AAPP2 = ComboBox43.ListIndex + 2

If ComboBox45.Value <> "" Then

AAPP3 = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox45.Value, lookat:=xlWhole).Row) - 2

AAPP4 = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox46.Value, lookat:=xlWhole).Row) - 2

AAAZ = ZZFFF3.Cells(AAPP2, 16383) + AAPP3

AAAC = ZZFFF3.Cells(AAPP2, 16384)

Label283.Caption = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4))

Label285.Caption = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1)

If ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) <> "" And ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) <> 0 Then

Label286.Caption = Round(ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) / ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)), 2)

End If

End If

End If

End If

Label310.Caption = ""

Label311.Caption = ""

Label312.Caption = ""

Label307.Caption = ""

Label308.Caption = ""

Label309.Caption = ""

Label305.Caption = ""

Label306.Caption = ""

If ComboBox42.Value <> "" Then

AAPP1 = CDbl(ZZFFF8.Range("b2:b1048571").Cells.Find(What:=ComboBox42.Value, lookat:=xlWhole).Row)

Label305.Caption = ZZFFF8.Cells(AAPP1, 13)

Label306.Caption = Round(ZZFFF8.Cells(AAPP1, 14), 2)

If ComboBox43.Value <> "" Then

AAPP2 = ComboBox43.ListIndex

Label307.Caption = ZZFFF8.Cells(AAPP1, 45 + (2 * AAPP2))

Label308.Caption = Round(ZZFFF8.Cells(AAPP1, 45 + (2 * AAPP2) + 1), 2)

If ZZFFF8.Cells(AAPP1, 45 + (2 * AAPP2)) > 0 Then

Label309.Caption = Round(ZZFFF8.Cells(AAPP1, 45 + (2 * AAPP2) + 1) / ZZFFF8.Cells(AAPP1, 45 + (2 * AAPP2)), 2)

End If

End If

If ComboBox45.Value <> "" Then

AAPP3 = CDbl(ZZFFF7.Range("b2:b3001").Cells.Find(What:=ComboBox45.Value, lookat:=xlWhole).Row) - 2

Label310.Caption = ZZFFF8.Cells(AAPP1, 2567 + (2 * AAPP3))

Label311.Caption = Round(ZZFFF8.Cells(AAPP1, 2567 + (2 * AAPP3) + 1), 2)

If ZZFFF8.Cells(AAPP1, 2567 + (2 * AAPP3)) > 0 Then

Label312.Caption = Round(ZZFFF8.Cells(AAPP1, 2567 + (2 * AAPP3) + 1) / ZZFFF8.Cells(AAPP1, 2567 + (2 * AAPP3)), 2)

End If

End If

End If

Exit Sub

EERR:

ComboBox6.Value = ""

End Sub

 

Private Sub ComboBox6_Change()

On Error GoTo EERR

Dim AAPP As Long

Dim AAAZ As Long

If TextBox1.Value = "ComboBox6" Then

ComboBox6.BackColor = &HFFFF&

ComboBox5.BackColor = &HFFFFFF

ComboBox7.BackColor = &HFFFFFF

ComboBox5.Value = ""

If ComboBox6.Value <> "" Then

ListBox2.ListIndex = ComboBox6.ListIndex

Else:

ListBox2.ListIndex = ListBox2.ListCount - 1

End If

If ComboBox6.Value <> "" Then

AAAZ = CDbl(ZZFFF7.Range("f2:f3001").Cells.Find(What:=ComboBox6.Value, lookat:=xlWhole).Row)

AAPP = ComboBox6.ListIndex + 2

ComboBox7.Value = ZZFFF7.Cells(AAPP, 2).Value

TextBox18.Value = ZZFFF7.Cells(AAPP, 3).Value

TextBox19.Value = ZZFFF7.Cells(AAPP, 4).Value

ComboBox8.Value = ZZFFF7.Cells(AAPP, 5).Value

TextBox21.Value = ZZFFF7.Cells(AAPP, 7).Value

TextBox22.Value = ZZFFF7.Cells(AAPP, 8).Value

TextBox23.Value = ZZFFF7.Cells(AAPP, 9).Value

TextBox24.Value = ZZFFF7.Cells(AAPP, 10).Value

TextBox25.Value = ZZFFF7.Cells(AAPP, 11).Value

TextBox26.Value = ZZFFF7.Cells(AAPP, 12).Value

End If

End If

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox6_Enter()

On Error GoTo EERR

Dim AAPP As Long

Dim AAAZ As Long

ComboBox6.BackColor = &HFFFF&

ComboBox5.BackColor = &HFFFFFF

ComboBox7.BackColor = &HFFFFFF

TextBox1.Value = "ComboBox6"

ListBox2.BoundColumn = 13

ListBox2.ColumnCount = 13

ListBox2.BackColor = &HFFFF&

With ZZFFF7

ListBox2.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 15)).Address(External:=True)

End With

ComboBox5.Value = ""

If ComboBox6.Value <> "" Then

ListBox2.ListIndex = ComboBox6.ListIndex

Else:

ListBox2.ListIndex = ListBox2.ListCount - 1

End If

If ComboBox6.Value <> "" Then

AAAZ = CDbl(ZZFFF7.Range("f2:f3001").Cells.Find(What:=ComboBox6.Value, lookat:=xlWhole).Row)

AAPP = ComboBox6.ListIndex + 2

ComboBox7.Value = ZZFFF7.Cells(AAPP, 2).Value

TextBox18.Value = ZZFFF7.Cells(AAPP, 3).Value

TextBox19.Value = ZZFFF7.Cells(AAPP, 4).Value

ComboBox8.Value = ZZFFF7.Cells(AAPP, 5).Value

TextBox21.Value = ZZFFF7.Cells(AAPP, 7).Value

TextBox22.Value = ZZFFF7.Cells(AAPP, 8).Value

TextBox23.Value = ZZFFF7.Cells(AAPP, 9).Value

TextBox24.Value = ZZFFF7.Cells(AAPP, 10).Value

TextBox25.Value = ZZFFF7.Cells(AAPP, 11).Value

TextBox26.Value = ZZFFF7.Cells(AAPP, 12).Value

End If

Exit Sub

EERR:

End Sub

 

Sub VBBV()

Dim SCHO As Long

Dim SCHO2 As Long

For SCHO = 0 To 315

For SCHO2 = 0 To 3

ZZFFF3.Cells((SCHO * 4 + 2) + SCHO2, 16383) = 1270 + (SCHO * 3000)

Next SCHO2

Next SCHO

End Sub

 

Sub VccV()

Dim SCHO As Long

Dim SCHO2 As Long

For SCHO = 0 To 315

For SCHO2 = 0 To 3

ZZFFF3.Cells((SCHO * 4 + 2) + SCHO2, 16384) = 3 + SCHO2 * 4094

Next SCHO2

Next SCHO

End Sub

 

Private Sub ComboBox12_Change()

On Error GoTo EERR

Dim AAPP As Long

Dim AAAZ As Long

If TextBox1.Value = "ComboBox12" Then

If ComboBox12.Value <> "" Then

AAAZ = CDbl(ZZFFF8.Range("f2:f50001").Cells.Find(What:=ComboBox12.Value, lookat:=xlWhole).Row)

AAPP = ComboBox12.ListIndex + 2

ComboBox13.Value = ZZFFF8.Cells(AAPP, 2).Value

TextBox28.Value = ZZFFF8.Cells(AAPP, 3).Value

TextBox29.Value = ZZFFF8.Cells(AAPP, 4).Value

ComboBox14.Value = ZZFFF8.Cells(AAPP, 5).Value

TextBox30.Value = ZZFFF8.Cells(AAPP, 6).Value

TextBox31.Value = ZZFFF8.Cells(AAPP, 7).Value

TextBox32.Value = ZZFFF8.Cells(AAPP, 8).Value

TextBox33.Value = ZZFFF8.Cells(AAPP, 9).Value

TextBox34.Value = ZZFFF8.Cells(AAPP, 10).Value

TextBox35.Value = ZZFFF8.Cells(AAPP, 11).Value

TextBox36.Value = ZZFFF8.Cells(AAPP, 12).Value

Label43.Visible = True

ComboBox15.Visible = True

CommandButton24.Visible = True

If ComboBox12.Value <> "" Then

ListBox3.ListIndex = ComboBox12.ListIndex

Else:

ListBox3.ListIndex = ListBox3.ListCount - 1

End If

Else:

ComboBox13.Value = ""

TextBox28.Value = ""

TextBox29.Value = ""

ComboBox14.Value = ""

TextBox30.Value = ""

TextBox31.Value = ""

TextBox32.Value = ""

TextBox33.Value = ""

TextBox34.Value = ""

TextBox35.Value = ""

TextBox36.Value = ""

Label43.Visible = False

ComboBox15.Visible = False

CommandButton24.Visible = False

ListBox3.ListIndex = ListBox3.ListCount - 1

End If

End If

Exit Sub

EERR:

ComboBox12.Value = ""

End Sub

 

Private Sub ComboBox12_Enter()

On Error GoTo EERR

Dim AAPP As Long

Dim AAAZ As Long

ComboBox12.BackColor = &HC0E0FF

ComboBox11.BackColor = &HFFFFFF

ComboBox13.BackColor = &HFFFFFF

TextBox1.Value = "ComboBox12"

ListBox3.BoundColumn = 13

ListBox3.ColumnCount = 13

ListBox3.BackColor = &HC0E0FF

ComboBox11.Value = ""

With ZZFFF8

ListBox3.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 15)).Address(External:=True)

End With

If ComboBox12.Value <> "" Then

ListBox3.ListIndex = ComboBox12.ListIndex

Else:

ListBox3.ListIndex = ListBox3.ListCount - 1

End If

If ComboBox12.Value <> "" Then

AAAZ = CDbl(ZZFFF8.Range("f2:f1048571").Cells.Find(What:=ComboBox12.Value, lookat:=xlWhole).Row)

AAPP = ComboBox12.ListIndex + 2

ComboBox13.Value = ZZFFF8.Cells(AAPP, 2).Value

TextBox28.Value = ZZFFF8.Cells(AAPP, 3).Value

TextBox29.Value = ZZFFF8.Cells(AAPP, 4).Value

ComboBox14.Value = ZZFFF8.Cells(AAPP, 5).Value

TextBox31.Value = ZZFFF8.Cells(AAPP, 7).Value

TextBox32.Value = ZZFFF8.Cells(AAPP, 8).Value

TextBox33.Value = ZZFFF8.Cells(AAPP, 9).Value

TextBox34.Value = ZZFFF8.Cells(AAPP, 10).Value

TextBox35.Value = ZZFFF8.Cells(AAPP, 11).Value

TextBox36.Value = ZZFFF8.Cells(AAPP, 12).Value

End If

Exit Sub

EERR:

End Sub

 

Private Sub ComboBox36_Change()

On Error GoTo EERR

Dim AAAZ As Long

Label211.Caption = ""

Label213.Caption = ""

If ComboBox36.Value <> "" Then

AAAZ = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox36.Value, lookat:=xlWhole).Row)

End If

Call ZLIPA2

If TextBox1.Value = "ComboBox36" Then

If ComboBox36.Value <> "" Then

ListBox6.ListIndex = AAAZ - 2

Else:

ListBox6.ListIndex = ListBox6.ListCount - 1

End If

Label191.Visible = True

ComboBox38.Visible = True

ComboBox38.Clear

With ComboBox38

.AddItem "Lagerplatzkonto"

.AddItem "Lagerplatz/Artikeln"

.AddItem "Lagerplatz/Lieferanten"

End With

End If

Exit Sub

EERR:

ComboBox36.Value = ""

End Sub

 

Private Sub ComboBox36_Enter()

On Error GoTo EERR

Dim AAAZ As Long

TextBox1.Value = "ComboBox36"

ListBox6.ColumnWidths = ""

ListBox6.BoundColumn = 3

ListBox6.ColumnCount = 3

ListBox6.BackColor = &HC0FFC0

If ComboBox36.Value <> "" Then

AAAZ = CDbl(ZZFFF5.Range("b2:b2048").Cells.Find(What:=ComboBox36.Value, lookat:=xlWhole).Row)

End If

With ZZFFF5

ListBox6.RowSource = .Range(.Cells(2, 2), .Cells(.Cells(Rows.Count, 2).End(xlUp).Row, 4)).Address(External:=True)

End With

If ComboBox36.Value <> "" Then

ListBox6.ListIndex = AAAZ - 2

Else:

ListBox6.ListIndex = ListBox6.ListCount - 1

End If

Label191.Visible = True

ComboBox38.Visible = True

ComboBox38.BackColor = &HC0FFC0

ComboBox38.Clear

With ComboBox38

.AddItem "Lagerplatzkonto"

.AddItem "Lagerplatz/Artikeln"

.AddItem "Lagerplatz/Lieferanten"

End With

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton28_Click()

On Error GoTo EERR

ZZFFF2.[n14] = "ZB"

CommandButton28.Visible = False

UserForm2.Show

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton36_Click()

On Error GoTo EERR

ZZFFF2.[n14] = "BU"

CommandButton36.Visible = False

UserForm2.Show

Exit Sub

EERR:

End Sub

 

Private Sub CommandButton40_Click()

On Error GoTo EERR

ZZFFF2.[n14] = "ES"

CommandButton40.Visible = False

UserForm2.Show

Exit Sub

EERR:

End Sub

 

Private Sub TextBox51_Change()

On Error Resume Next

CommandButton40.Visible = False

If TextBox51.Value <> "" Then

Dim AAAZ1 As Long

Dim AAAC As Long

Dim ECHEA As Variant

Dim ECHER As Variant

Dim ECHES As Variant

Dim AAPP1 As Long

Dim AAPP2 As Long

Dim AAPP3 As Long

Dim AAPP4 As Long

Dim AAPP5 As Long

Dim AAPP6 As Long

Dim AAPP7 As Long

Dim AAPP8 As Long

Dim AAPP9 As Long

Dim AAAZ As Long

Dim AAAZ2 As Long

Dim AAAZ3 As Long

Dim SPOS As Long

Dim SCHOT As Long

Dim RRRR As Long

ComboBox41.SetFocus

ECHER = ComboBox41.Value

ComboBox41.Value = "kkk"

ComboBox41.Value = ECHER

If ComboBox42.Value = "" Then

MsgBox "Diese ID-Nr. kann nicht gelöscht werden, Kundenkonto aus dem Eintrag existiert nicht mehr!", 48, "http://excel.hpage.de"

ComboBox42.SetFocus

Exit Sub

End If

If ComboBox43.Value = "" Then

MsgBox "Diese ID-Nr. kann nicht gelöscht werden, Artikelkonto aus dem Eintrag existiert nicht mehr!", 48, "http://excel.hpage.de"

ComboBox43.SetFocus

Exit Sub

End If

If ComboBox45.Value = "" Then

MsgBox "Diese ID-Nr. kann nicht gelöscht werden, Lieferantenkonto aus dem Eintrag existiert nicht mehr!", 48, "http://excel.hpage.de"

ComboBox45.SetFocus

Exit Sub

End If

If ComboBox46.Value = "" Then

MsgBox "Diese ID-Nr. kann nicht gelöscht werden, Lagerplatzkonto aus dem Eintrag existiert nicht mehr!", 48, "http://excel.hpage.de"

ComboBox46.SetFocus

Exit Sub

End If

ECHEA = ComboBox45.Value

ECHER = ComboBox46.Value

AAPP1 = CDbl(ZZFFF2.Range("a7:a1048571").Cells.Find(What:=ZZFFF2.[ab8], lookat:=xlWhole).Row)

AAPP5 = CDbl(ZZFFF2.Range("bg7:bg1048571").Cells.Find(What:=ZZFFF2.[ab8], lookat:=xlWhole).Row)

AAPP2 = ZZFFF2.Cells(AAPP5, 62)

AAPP3 = ZZFFF2.Cells(AAPP5, 61)

AAPP4 = ZZFFF2.Cells(AAPP5, 63)

AAPP6 = ZZFFF2.Cells(AAPP5, 65)

AAPP7 = ZZFFF2.Cells(AAPP5, 67)

AAPP8 = ZZFFF2.Cells(AAPP5, 73)

AAPP9 = ZZFFF2.Cells(AAPP5, 74)

SPOS = ZZFFF2.Cells(AAPP5, 75)

If ComboBox45.Value <> "" Then

ZZFFF7.Cells(AAPP2, 13) = ZZFFF7.Cells(AAPP2, 13) + ZZFFF2.Cells(AAPP1, 7).Value

ZZFFF7.Cells(AAPP2, 14) = ZZFFF7.Cells(AAPP2, 14) + ZZFFF2.Cells(AAPP1, 8).Value

ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2) = ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2) + ZZFFF2.Cells(AAPP1, 7).Value

ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2 + 1) = ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2 + 1) + ZZFFF2.Cells(AAPP1, 8).Value

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2) = ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2) + ZZFFF2.Cells(AAPP1, 7).Value

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) = ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) + ZZFFF2.Cells(AAPP1, 8).Value

ZZFFF7.Cells(AAPP2, 9186 + (AAPP3 - 2) * 2) = ZZFFF7.Cells(AAPP2, 9186 + (AAPP3 - 2) * 2) - ZZFFF2.Cells(AAPP1, 7).Value

If ZZFFF7.Cells(AAPP2, 9186 + (AAPP3 - 2) * 2) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 9186 + (AAPP3 - 2) * 2) = ""

End If

ZZFFF7.Cells(AAPP2, 9186 + (AAPP3 - 2) * 2 + 1) = ZZFFF7.Cells(AAPP2, 9186 + (AAPP3 - 2) * 2 + 1) - ZZFFF2.Cells(AAPP1, 8).Value

If ZZFFF7.Cells(AAPP2, 9186 + (AAPP3 - 2) * 2 + 1) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 9186 + (AAPP3 - 2) * 2 + 1) = ""

End If

If ZZFFF7.Cells(AAPP2, 9186 + (AAPP3 - 2) * 2) = "" Or ZZFFF7.Cells(AAPP2, 9186 + (AAPP3 - 2) * 2 + 1) = "" Then

ZZFFF7.Cells(AAPP2, 9186 + (AAPP3 - 2) * 2) = ""

ZZFFF7.Cells(AAPP2, 9186 + (AAPP3 - 2) * 2 + 1) = ""

End If

End If

If ComboBox43.Value <> "" Then

AAAZ3 = ZZFFF2.Cells(AAPP5, 66)

ZZFFF4.Cells(AAAZ3, AAPP6) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 1) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 2) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 3) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 4) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 5) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 6) = ""

ZZFFF4.Cells(4, AAPP6 + 3).FormulaR1C1 = "=SUM(R[5]C:R[1048567]C)"

ZZFFF4.Cells(4, AAPP6 + 3) = ZZFFF4.Cells(4, AAPP6 + 3)

ZZFFF4.Cells(5, AAPP6 + 4).FormulaR1C1 = "=SUM(R[4]C:R[1048566]C)"

ZZFFF4.Cells(5, AAPP6 + 4) = ZZFFF4.Cells(5, AAPP6 + 4)

If ZZFFF4.Cells(4, AAPP6 + 3) <> "" And ZZFFF4.Cells(4, AAPP6 + 3) <> 0 Then

ZZFFF4.Cells(6, AAPP6) = Round(ZZFFF4.Cells(5, AAPP6 + 4) / ZZFFF4.Cells(4, AAPP6 + 3), 2)

Else:

ZZFFF4.Cells(6, AAPP6) = ""

End If

ZZFFF3.Cells(AAPP3, 6) = ZZFFF4.Cells(4, AAPP6 + 3)

ZZFFF3.Cells(AAPP3, 7) = ZZFFF4.Cells(5, AAPP6 + 4)

ZZFFF3.Cells(AAPP3, 8) = ZZFFF4.Cells(6, AAPP6)

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) = ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) + ZZFFF2.Cells(AAPP1, 7).Value

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) = ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) + ZZFFF2.Cells(AAPP1, 8).Value

ZZFFF3.Cells(AAPP3, 17) = ZZFFF3.Cells(AAPP3, 17) - ZZFFF2.Cells(AAPP1, 7).Value

If ZZFFF3.Cells(AAPP3, 17) <= 0.001 Then

ZZFFF3.Cells(AAPP3, 17) = ""

End If

ZZFFF3.Cells(AAPP3, 18) = ZZFFF3.Cells(AAPP3, 18) - ZZFFF2.Cells(AAPP1, 8).Value

If ZZFFF3.Cells(AAPP3, 18) <= 0.001 Then

ZZFFF3.Cells(AAPP3, 18) = ""

End If

If ZZFFF3.Cells(AAPP3, 17) = "" Or ZZFFF3.Cells(AAPP3, 18) = "" Then

ZZFFF3.Cells(AAPP3, 17) = ""

ZZFFF3.Cells(AAPP3, 18) = ""

End If

ZZFFF3.Cells(AAPP3, 19) = ""

If ZZFFF3.Cells(AAPP3, 17) > 0 Then

ZZFFF3.Cells(AAPP3, 19) = Round(ZZFFF3.Cells(AAPP3, 18) / ZZFFF3.Cells(AAPP3, 17), 2)

End If

End If

If ComboBox46.Value <> "" Then

AAAZ3 = ZZFFF2.Cells(AAPP5, 68).Value

ZZFFF6.Cells(AAAZ3, AAPP7) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 1) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 2) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 3) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 4) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 5) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 6) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 7) = ""

ZZFFF6.Cells(2, AAPP7 + 5).FormulaR1C1 = "=SUM(R[3]C:R[1048569]C)"

ZZFFF6.Cells(2, AAPP7 + 5) = ZZFFF6.Cells(2, AAPP7 + 5)

ZZFFF6.Cells(3, AAPP7 + 6).FormulaR1C1 = "=SUM(R[2]C:R[1048568]C)"

ZZFFF6.Cells(3, AAPP7 + 6) = ZZFFF6.Cells(3, AAPP7 + 6)

ZZFFF5.Cells(AAPP4, 3) = ZZFFF6.Cells(2, AAPP7 + 5)

ZZFFF5.Cells(AAPP4, 4) = ZZFFF6.Cells(3, AAPP7 + 6)

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2) = ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2) + ZZFFF2.Cells(AAPP1, 7).Value

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) = ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) + ZZFFF2.Cells(AAPP1, 8).Value

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2) = ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2) + ZZFFF2.Cells(AAPP1, 7).Value

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) = ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) + ZZFFF2.Cells(AAPP1, 8).Value

End If

If ComboBox42.Value <> "" Then

ZZFFF8.Cells(AAPP8, 13) = ZZFFF8.Cells(AAPP8, 13) - ZZFFF2.Cells(AAPP1, 7).Value

If ZZFFF8.Cells(AAPP8, 13) <= 0.001 Then

ZZFFF8.Cells(AAPP8, 13) = ""

End If

ZZFFF8.Cells(AAPP8, 14) = ZZFFF8.Cells(AAPP8, 14) - ZZFFF2.Cells(AAPP1, 8).Value

If ZZFFF8.Cells(AAPP8, 14) <= 0.001 Then

ZZFFF8.Cells(AAPP8, 14) = ""

End If

If ZZFFF8.Cells(AAPP8, 13) = "" Or ZZFFF8.Cells(AAPP8, 14) = "" Then

ZZFFF8.Cells(AAPP8, 13) = ""

ZZFFF8.Cells(AAPP8, 14) = ""

End If

ZZFFF8.Cells(AAPP8, 45 + (AAPP3 - 2) * 2) = ZZFFF8.Cells(AAPP8, 45 + (AAPP3 - 2) * 2) - ZZFFF2.Cells(AAPP1, 7).Value

If ZZFFF8.Cells(AAPP8, 45 + (AAPP3 - 2) * 2) <= 0.001 Then

ZZFFF8.Cells(AAPP8, 45 + (AAPP3 - 2) * 2) = ""

End If

ZZFFF8.Cells(AAPP8, 45 + (AAPP3 - 2) * 2 + 1) = ZZFFF8.Cells(AAPP8, 45 + (AAPP3 - 2) * 2 + 1) - ZZFFF2.Cells(AAPP1, 8).Value

If ZZFFF8.Cells(AAPP8, 45 + (AAPP3 - 2) * 2 + 1) <= 0.001 Then

ZZFFF8.Cells(AAPP8, 45 + (AAPP3 - 2) * 2 + 1) = ""

End If

If ZZFFF8.Cells(AAPP8, 45 + (AAPP3 - 2) * 2) = "" Or ZZFFF8.Cells(AAPP8, 45 + (AAPP3 - 2) * 2 + 1) = "" Then

ZZFFF8.Cells(AAPP8, 45 + (AAPP3 - 2) * 2) = ""

ZZFFF8.Cells(AAPP8, 45 + (AAPP3 - 2) * 2 + 1) = ""

End If

ZZFFF8.Cells(AAPP8, 2567 + (AAPP2 - 2) * 2) = ZZFFF8.Cells(AAPP8, 2567 + (AAPP2 - 2) * 2) - ZZFFF2.Cells(AAPP1, 7).Value

If ZZFFF8.Cells(AAPP8, 2567 + (AAPP2 - 2) * 2) <= 0.001 Then

ZZFFF8.Cells(AAPP8, 2567 + (AAPP2 - 2) * 2) = ""

End If

ZZFFF8.Cells(AAPP8, 2567 + (AAPP2 - 2) * 2 + 1) = ZZFFF8.Cells(AAPP8, 2567 + (AAPP2 - 2) * 2 + 1) - ZZFFF2.Cells(AAPP1, 8).Value

If ZZFFF8.Cells(AAPP8, 2567 + (AAPP2 - 2) * 2 + 1) <= 0.001 Then

ZZFFF8.Cells(AAPP8, 2567 + (AAPP2 - 2) * 2 + 1) = ""

End If

If ZZFFF8.Cells(AAPP8, 2567 + (AAPP2 - 2) * 2) = "" Or ZZFFF8.Cells(AAPP8, 2567 + (AAPP2 - 2) * 2 + 1) = "" Then

ZZFFF8.Cells(AAPP8, 2567 + (AAPP2 - 2) * 2) = ""

ZZFFF8.Cells(AAPP8, 2567 + (AAPP2 - 2) * 2 + 1) = ""

End If

End If

AAPP3 = ComboBox43.ListIndex + 2

AAPP2 = AAPP2 - 2

AAPP4 = AAPP4 - 2

ZZFFF2.Cells(AAPP5, 25).Value = ComboBox43.ListIndex + 2

ZZFFF2.Cells(AAPP5, 26).Value = ComboBox45.ListIndex

ZZFFF2.Cells(AAPP5, 27).Value = ComboBox46.ListIndex

AAAZ1 = ZZFFF3.Cells(AAPP3, 16383) + AAPP2

AAAC = ZZFFF3.Cells(AAPP3, 16384)

ZZFFF3.Cells(AAAZ1, AAAC + (2 * AAPP4)) = ZZFFF3.Cells(AAAZ1, AAAC + (2 * AAPP4)) + ZZFFF2.Cells(AAPP1, 7).Value

ZZFFF3.Cells(AAAZ1, AAAC + (2 * AAPP4) + 1) = ZZFFF3.Cells(AAAZ1, AAAC + (2 * AAPP4) + 1) + ZZFFF2.Cells(AAPP1, 8).Value

AAAZ1 = ZZFFF2.Cells(AAPP5, 76).Value

ZZFFF9.Cells(AAPP9, AAAZ1).Value = ""

ZZFFF9.Cells(AAPP9, 443).Value = ZZFFF9.Cells(AAPP9, 443).Value - 1

If ZZFFF9.Cells(AAPP9, 443).Value <= 0 Then

ZZFFF9.Cells(AAPP9, 443).Value = ""

End If

ZZFFF9.Cells(AAPP9, AAAZ1 + 1).Value = ""

ZZFFF9.Cells(AAPP9, AAAZ1 + 2).Value = ""

ZZFFF9.Cells(AAPP9, AAAZ1 + 3).Value = ""

ZZFFF9.Cells(AAPP9, AAAZ1 + 4).Value = ""

ZZFFF9.Cells(AAPP9, AAAZ1 + 5).Value = ""

ZZFFF9.Cells(AAPP9, AAAZ1 + 6).Value = ""

ZZFFF9.Cells(AAPP9, AAAZ1 + 7).Value = ""

ZZFFF9.Cells(AAPP9, AAAZ1 + 8).Value = ""

ZZFFF9.Cells(AAPP9, AAAZ1 + 9).Value = ""

ZZFFF9.Cells(AAPP9, AAAZ1 + 10).Value = ""

ZZFFF9.Cells(AAPP9, SPOS + 445).Value = ""

ZZFFF9.Cells(AAPP9, SPOS + 487).Value = ""

RRRR = 0

For SCHOT = 0 To 39

If ZZFFF9.Cells(AAPP9, SCHOT * 11 + 2) = "" Then

RRRR = RRRR + 1

If RRRR = 40 Then

ZZFFF9.Cells(AAPP9, 1).Value = ""

ZZFFF9.Cells(AAPP9, 442).Value = ""

End If

End If

Next SCHOT

With ZZFFF9

ComboBox40.RowSource = .Range(.Cells(2, 1), .Cells(.Cells(Rows.Count, 1).End(xlUp).Row, 1)).Address(External:=True)

End With

ComboBox40.Value = ""

ECHES = ZZFFF9.Cells(AAPP9, 1).Value

ZZFFF2.Cells(AAPP1, 1).Value = ""

ZZFFF2.Cells(AAPP1, 2).Value = ""

ZZFFF2.Cells(AAPP1, 3).Value = ""

ZZFFF2.Cells(AAPP1, 4).Value = ""

ZZFFF2.Cells(AAPP1, 5).Value = ""

ZZFFF2.Cells(AAPP1, 6).Value = ""

ZZFFF2.Cells(AAPP1, 7).Value = ""

ZZFFF2.Cells(AAPP1, 8).Value = ""

ZZFFF2.Cells(AAPP1, 9).Value = ""

ZZFFF2.Cells(AAPP1, 10).Value = ""

ZZFFF2.Cells(AAPP1, 11).Value = ""

ZZFFF2.Cells(AAPP5, 59).Value = ""

ZZFFF2.Cells(AAPP5, 60).Value = ""

ZZFFF2.Cells(AAPP5, 61).Value = ""

ZZFFF2.Cells(AAPP5, 62).Value = ""

ZZFFF2.Cells(AAPP5, 63).Value = ""

ZZFFF2.Cells(AAPP5, 65).Value = ""

ZZFFF2.Cells(AAPP5, 67).Value = ""

ZZFFF2.Cells(AAPP5, 73).Value = ""

ZZFFF2.Cells(AAPP5, 74).Value = ""

ZZFFF2.Cells(AAPP5, 75).Value = ""

ZZFFF2.Cells(AAPP5, 76).Value = ""

Call ZLIPA2

TextBox53.Value = ""

ComboBox41.SetFocus

ComboBox41.Value = ""

ComboBox45.SetFocus

ComboBox45.Value = ECHEA

ComboBox46.SetFocus

ComboBox46.Value = ECHER

ComboBox40.SetFocus

ComboBox40.Value = ECHES

ComboBox41.SetFocus

MsgBox "ID-Nr. " & ZZFFF2.[ab8] & " ist gelöscht!", 48, "http://excel.hpage.de    "

TextBox51.Value = ""

End If

Exit Sub

End Sub

 

Private Sub CommandButton32_Click()

On Error GoTo EERR

ZZFFF2.[n14] = "GN"

CommandButton32.Visible = False

UserForm2.Show

Exit Sub

EERR:

End Sub

 

Private Sub TextBox37_Change()

On Error GoTo EERR

If TextBox37.Value <> "" Then

Dim AAAC As Long

Dim ECHER As Variant

Dim AAPP1 As Long

Dim AAPP2 As Long

Dim AAPP3 As Long

Dim AAPP4 As Long

Dim AAPP5 As Long

Dim AAPP6 As Long

Dim AAPP7 As Long

Dim AAAZ As Long

Dim AAAZ2 As Long

Dim AAAZ3 As Long

ComboBox16.SetFocus

ECHER = ComboBox16.Value

ComboBox16.Value = "kkk"

ComboBox16.Value = ECHER

If ComboBox18.Value = "" Then

MsgBox "Diese ID-Nr. kann nicht gelöscht werden, Artikelkonto aus dem Eintrag existiert nicht mehr!", 48, "http://excel.hpage.de"

ComboBox18.SetFocus

Exit Sub

End If

If ComboBox17.Value = "" Then

MsgBox "Diese ID-Nr. kann nicht gelöscht werden, Lieferantenkonto aus dem Eintrag existiert nicht mehr!", 48, "http://excel.hpage.de"

ComboBox17.SetFocus

Exit Sub

End If

If ComboBox22.Value = "" Then

MsgBox "Diese ID-Nr. kann nicht gelöscht werden, Lagerplatzkonto aus dem Eintrag existiert nicht mehr!", 48, "http://excel.hpage.de"

ComboBox22.SetFocus

Exit Sub

End If

ZZFFF2.[k1] = ComboBox16.Value

AAPP1 = CDbl(ZZFFF2.Range("a7:a1048571").Cells.Find(What:=ComboBox16.Value, lookat:=xlWhole).Row)

AAPP5 = CDbl(ZZFFF2.Range("o7:o1048571").Cells.Find(What:=ComboBox16.Value, lookat:=xlWhole).Row)

AAPP2 = ZZFFF2.Cells(AAPP5, 18)

AAPP3 = ZZFFF2.Cells(AAPP5, 17)

AAPP4 = ZZFFF2.Cells(AAPP5, 19)

AAPP6 = ZZFFF2.Cells(AAPP5, 21)

AAPP7 = ZZFFF2.Cells(AAPP5, 23)

AAAZ2 = ZZFFF2.Cells(AAPP5, 20)

If Label95.Caption <> "" Then

If ZZFFF2.Cells(AAPP1, 8) > CDbl(Label95.Caption) Then

MsgBox "Dieser Eintrag kann nicht gelöscht werden. Wert im Eintrag ist höher als auf dem Lagerplatz!", 48, "http://excel.hpage.de"

TextBox41.SetFocus

TextBox37.Value = ""

Exit Sub

End If

End If

If Label93.Caption <> "" Then

If ZZFFF2.Cells(AAPP1, 7) > CDbl(Label93.Caption) Then

MsgBox "Dieser Eintrag kann nicht gelöscht werden. Menge im Eintrag ist höher als auf dem Lagerplatz!", 48, "http://excel.hpage.de"

TextBox40.SetFocus

TextBox37.Value = ""

Exit Sub

End If

End If

If Label95.Caption = "" Then

MsgBox "Dieser Eintrag kann nicht gelöscht werden. Wert im Eintrag ist höher als auf dem Lagerplatz!", 48, "http://excel.hpage.de"

TextBox41.SetFocus

TextBox37.Value = ""

Exit Sub

End If

If Label93.Caption = "" Then

MsgBox "Dieser Eintrag kann nicht gelöscht werden. Menge im Eintrag ist höher als auf dem Lagerplatz!", 48, "http://excel.hpage.de"

TextBox40.SetFocus

TextBox37.Value = ""

Exit Sub

End If

ZZFFF7.Cells(AAPP2, 13) = ZZFFF7.Cells(AAPP2, 13) - ZZFFF2.Cells(AAPP1, 7).Value

If ZZFFF7.Cells(AAPP2, 13) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 13) = ""

End If

ZZFFF7.Cells(AAPP2, 14) = ZZFFF7.Cells(AAPP2, 14) - ZZFFF2.Cells(AAPP1, 8).Value

If ZZFFF7.Cells(AAPP2, 14) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 14) = ""

End If

ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2) = ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2) - ZZFFF2.Cells(AAPP1, 7)

If ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2) = ""

End If

ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2 + 1) = ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2 + 1) - ZZFFF2.Cells(AAPP1, 8)

If ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2 + 1) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2 + 1) = ""

End If

ZZFFF7.Cells(AAPP2, 6664 + (AAPP3 - 2) * 2) = ZZFFF7.Cells(AAPP2, 6664 + (AAPP3 - 2) * 2) - ZZFFF2.Cells(AAPP1, 7)

If ZZFFF7.Cells(AAPP2, 6664 + (AAPP3 - 2) * 2) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 6664 + (AAPP3 - 2) * 2) = ""

End If

ZZFFF7.Cells(AAPP2, 6664 + (AAPP3 - 2) * 2 + 1) = ZZFFF7.Cells(AAPP2, 6664 + (AAPP3 - 2) * 2 + 1) - ZZFFF2.Cells(AAPP1, 8)

If ZZFFF7.Cells(AAPP2, 6664 + (AAPP3 - 2) * 2 + 1) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 6664 + (AAPP3 - 2) * 2 + 1) = ""

End If

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2) = ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2) - ZZFFF2.Cells(AAPP1, 7)

If ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2) = ""

End If

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) = ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) - ZZFFF2.Cells(AAPP1, 8)

If ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) = ""

End If

AAAZ3 = ZZFFF2.Cells(AAPP5, 22)

ZZFFF4.Cells(AAAZ3, AAPP6) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 1) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 2) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 3) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 4) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 5) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 6) = ""

ZZFFF4.Cells(4, AAPP6 + 3).FormulaR1C1 = "=SUM(R[5]C:R[1048567]C)"

ZZFFF4.Cells(4, AAPP6 + 3) = ZZFFF4.Cells(4, AAPP6 + 3)

ZZFFF4.Cells(5, AAPP6 + 4).FormulaR1C1 = "=SUM(R[4]C:R[1048566]C)"

ZZFFF4.Cells(5, AAPP6 + 4) = ZZFFF4.Cells(5, AAPP6 + 4)

If ZZFFF4.Cells(4, AAPP6 + 3) <> "" And ZZFFF4.Cells(4, AAPP6 + 3) <> 0 Then

ZZFFF4.Cells(6, AAPP6) = Round(ZZFFF4.Cells(5, AAPP6 + 4) / ZZFFF4.Cells(4, AAPP6 + 3), 2)

Else:

ZZFFF4.Cells(6, AAPP6) = ""

End If

ZZFFF3.Cells(AAPP3, 6) = ZZFFF4.Cells(4, AAPP6 + 3)

If ZZFFF3.Cells(AAPP3, 6) = 0 Then

ZZFFF3.Cells(AAPP3, 6) = ""

End If

ZZFFF3.Cells(AAPP3, 7) = ZZFFF4.Cells(5, AAPP6 + 4)

If ZZFFF3.Cells(AAPP3, 7) = 0 Then

ZZFFF3.Cells(AAPP3, 7) = ""

End If

ZZFFF3.Cells(AAPP3, 8) = ZZFFF4.Cells(6, AAPP6)

If ZZFFF3.Cells(AAPP3, 8) <= 0.001 Then

ZZFFF3.Cells(AAPP3, 8) = ""

End If

ZZFFF3.Cells(AAPP3, 13) = ZZFFF3.Cells(AAPP3, 13) - ZZFFF2.Cells(AAPP1, 7)

If ZZFFF3.Cells(AAPP3, 13) <= 0.001 Then

ZZFFF3.Cells(AAPP3, 13) = ""

End If

ZZFFF3.Cells(AAPP3, 14) = ZZFFF3.Cells(AAPP3, 14) - ZZFFF2.Cells(AAPP1, 8)

If ZZFFF3.Cells(AAPP3, 14) <= 0.001 Then

ZZFFF3.Cells(AAPP3, 14) = ""

End If

If ZZFFF3.Cells(AAPP3, 13) > 0 Then

ZZFFF3.Cells(AAPP3, 15) = Round(ZZFFF3.Cells(AAPP3, 14) / ZZFFF3.Cells(AAPP3, 13), 2)

Else:

ZZFFF3.Cells(AAPP3, 15) = ""

End If

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) = ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) - ZZFFF2.Cells(AAPP1, 7).Value

If ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) = 0 Then

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) = ""

End If

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) = ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) - ZZFFF2.Cells(AAPP1, 8).Value

If ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) = 0 Then

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) = ""

End If

AAAZ3 = ZZFFF2.Cells(AAPP5, 24).Value

ZZFFF6.Cells(AAAZ3, AAPP7) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 1) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 2) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 3) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 4) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 5) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 6) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 7) = ""

ZZFFF6.Cells(2, AAPP7 + 5).FormulaR1C1 = "=SUM(R[3]C:R[1048569]C)"

ZZFFF6.Cells(2, AAPP7 + 5) = ZZFFF6.Cells(2, AAPP7 + 5)

ZZFFF6.Cells(3, AAPP7 + 6).FormulaR1C1 = "=SUM(R[2]C:R[1048568]C)"

ZZFFF6.Cells(3, AAPP7 + 6) = ZZFFF6.Cells(3, AAPP7 + 6)

ZZFFF5.Cells(AAPP4, 3) = ZZFFF6.Cells(2, AAPP7 + 5)

If ZZFFF5.Cells(AAPP4, 3) <= 0.001 Then

ZZFFF5.Cells(AAPP4, 3) = ""

End If

ZZFFF5.Cells(AAPP4, 4) = ZZFFF6.Cells(3, AAPP7 + 6)

If ZZFFF5.Cells(AAPP4, 4) <= 0.001 Then

ZZFFF5.Cells(AAPP4, 4) = ""

End If

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2) = ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2) - ZZFFF2.Cells(AAPP1, 7).Value

If ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2) <= 0.001 Then

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2) = ""

End If

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) = ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) - ZZFFF2.Cells(AAPP1, 8).Value

If ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) <= 0.001 Then

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) = ""

End If

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2) = ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2) - ZZFFF2.Cells(AAPP1, 7).Value

If ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2) <= 0.001 Then

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2) = ""

End If

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) = ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) - ZZFFF2.Cells(AAPP1, 8).Value

If ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) <= 0.001 Then

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) = ""

End If

AAPP3 = ZZFFF2.Cells(AAPP5, 17)

AAPP2 = ZZFFF2.Cells(AAPP5, 18) - 2

AAPP4 = ZZFFF2.Cells(AAPP5, 19) - 2

AAAZ = ZZFFF3.Cells(AAPP3, 16383) + AAPP2

AAAC = ZZFFF3.Cells(AAPP3, 16384)

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) - ZZFFF2.Cells(AAPP1, 7).Value

If ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) <= 0.001 Then

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) = ""

End If

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) - ZZFFF2.Cells(AAPP1, 8).Value

If ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) <= 0.001 Then

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) = ""

End If

ZZFFF2.Cells(AAPP1, 1).Value = ""

ZZFFF2.Cells(AAPP1, 2).Value = ""

ZZFFF2.Cells(AAPP1, 3).Value = ""

ZZFFF2.Cells(AAPP1, 4).Value = ""

ZZFFF2.Cells(AAPP1, 5).Value = ""

ZZFFF2.Cells(AAPP1, 6).Value = ""

ZZFFF2.Cells(AAPP1, 7).Value = ""

ZZFFF2.Cells(AAPP1, 8).Value = ""

ZZFFF2.Cells(AAPP1, 9).Value = ""

ZZFFF2.Cells(AAPP1, 10).Value = ""

ZZFFF2.Cells(AAPP5, 15).Value = ""

ZZFFF2.Cells(AAPP5, 16).Value = ""

ZZFFF2.Cells(AAPP5, 20).Value = ""

ZZFFF2.Cells(AAPP5, 17).Value = ""

ZZFFF2.Cells(AAPP5, 18).Value = ""

ZZFFF2.Cells(AAPP5, 19).Value = ""

ZZFFF2.Cells(AAPP5, 21).Value = ""

ZZFFF2.Cells(AAPP5, 23).Value = ""

ZZFFF2.Cells(AAPP5, 22).Value = ""

ZZFFF2.Cells(AAPP5, 24).Value = ""

ZZFFF2.Cells(AAPP5, 25).Value = ""

ZZFFF2.Cells(AAPP5, 26).Value = ""

ZZFFF2.Cells(AAPP5, 27).Value = ""

Call ZLIPA2

With ZZFFF2

ComboBox16.RowSource = .Range(.Cells(8, 15), .Cells(.Cells(Rows.Count, 15).End(xlUp).Row, 15)).Address(External:=True)

End With

ComboBox16.SetFocus

ComboBox20.Value = ComboBox22.Value

ComboBox21.Value = ComboBox22.Value

MsgBox "ID-Nr. " & ZZFFF2.[k1] & " ist gelöscht!", 48, "http://excel.hpage.de    "

ZZFFF2.[k1] = ""

TextBox37.Value = ""

End If

Exit Sub

EERR:

End Sub

 

Private Sub TextBox46_Change()

On Error GoTo EERR

If TextBox46.Value <> "" Then

Dim AAAC As Long

Dim SCHOT As Long

Dim ECHER As Variant

Dim AAPP1 As Long

Dim AAPP2 As Long

Dim AAPP3 As Long

Dim AAPP4 As Long

Dim AAPP5 As Long

Dim AAPP6 As Long

Dim AAPP7 As Long

Dim AAPP8 As Long

Dim AAPP9 As Long

Dim AAAZ As Long

Dim AAAZ2 As Long

Dim AAAZ3 As Long

ComboBox32.SetFocus

ECHER = ComboBox32.Value

ComboBox32.Value = "kkk"

ComboBox32.Value = ECHER

If ComboBox33.Value = "" Then

MsgBox "Diese ID-Nr. kann nicht gelöscht werden, Artikelkonto aus dem Eintrag existiert nicht mehr!", 48, "http://excel.hpage.de"

ComboBox33.SetFocus

Exit Sub

End If

If ComboBox35.Value = "" Then

MsgBox "Diese ID-Nr. kann nicht gelöscht werden, Lieferantenkonto aus dem Eintrag existiert nicht mehr!", 48, "http://excel.hpage.de"

ComboBox35.SetFocus

Exit Sub

End If

If ComboBox36.Value = "" Then

MsgBox "Diese ID-Nr. kann nicht gelöscht werden, Lagerplatzkonto aus dem Eintrag existiert nicht mehr!", 48, "http://excel.hpage.de"

ComboBox36.SetFocus

Exit Sub

End If

If ComboBox37.Value = "" Then

MsgBox "Diese ID-Nr. kann nicht gelöscht werden, Lagerplatzkonto aus dem Eintrag existiert nicht mehr!", 48, "http://excel.hpage.de"

ComboBox37.SetFocus

Exit Sub

End If

ZZFFF2.[k1] = ComboBox32.Value

AAPP1 = CDbl(ZZFFF2.Range("a7:a1048571").Cells.Find(What:=ComboBox32.Value, lookat:=xlWhole).Row)

AAPP5 = CDbl(ZZFFF2.Range("ap7:ap1048571").Cells.Find(What:=ComboBox32.Value, lookat:=xlWhole).Row)

AAPP2 = ZZFFF2.Cells(AAPP5, 45)

AAPP3 = ZZFFF2.Cells(AAPP5, 44)

AAPP4 = ZZFFF2.Cells(AAPP5, 46)

AAPP6 = ZZFFF2.Cells(AAPP5, 48)

AAPP7 = ZZFFF2.Cells(AAPP5, 50)

AAAZ2 = ZZFFF2.Cells(AAPP5, 47)

AAPP8 = ZZFFF2.Cells(AAPP5, 55)

AAPP9 = ZZFFF2.Cells(AAPP5, 56)

If Label219.Caption <> "" Then

If ZZFFF2.Cells(AAPP1, 8) > CDbl(Label219.Caption) Then

MsgBox "Dieser Eintrag kann nicht gelöscht werden. Wert im Eintrag ist höher als auf dem An Lagerplatz!", 48, "http://excel.hpage.de"

TextBox46.Value = ""

Exit Sub

End If

End If

If Label217.Caption <> "" Then

If ZZFFF2.Cells(AAPP1, 7) > CDbl(Label217.Caption) Then

MsgBox "Dieser Eintrag kann nicht gelöscht werden. Menge im Eintrag ist höher als auf dem An Lagerplatz!", 48, "http://excel.hpage.de"

TextBox49.SetFocus

TextBox46.Value = ""

Exit Sub

End If

End If

If Label219.Caption = "" Then

MsgBox "Dieser Eintrag kann nicht gelöscht werden. Wert im Eintrag ist höher als auf dem An Lagerplatz!", 48, "http://excel.hpage.de"

TextBox46.Value = ""

Exit Sub

End If

If Label217.Caption = "" Then

MsgBox "Dieser Eintrag kann nicht gelöscht werden. Menge im Eintrag ist höher als auf dem An Lagerplatz!", 48, "http://excel.hpage.de"

TextBox49.SetFocus

TextBox46.Value = ""

Exit Sub

End If

Label114.Caption = ZZFFF2.Cells(AAPP1, 8).Value

TextBox50.Value = Label114.Caption

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2) = ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2) + CDbl(TextBox49.Value)

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) = ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) + CDbl(Label114.Caption)

ZZFFF7.Cells(AAPP2, 2567 + (AAPP8 - 2) * 2) = ZZFFF7.Cells(AAPP2, 2567 + (AAPP8 - 2) * 2) - CDbl(TextBox49.Value)

If ZZFFF7.Cells(AAPP2, 2567 + (AAPP8 - 2) * 2) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 2567 + (AAPP8 - 2) * 2) = ""

End If

ZZFFF7.Cells(AAPP2, 2567 + (AAPP8 - 2) * 2 + 1) = ZZFFF7.Cells(AAPP2, 2567 + (AAPP8 - 2) * 2 + 1) - CDbl(Label114.Caption)

If ZZFFF7.Cells(AAPP2, 2567 + (AAPP8 - 2) * 2 + 1) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 2567 + (AAPP8 - 2) * 2 + 1) = ""

End If

If ZZFFF7.Cells(AAPP2, 2567 + (AAPP8 - 2) * 2) = "" Or ZZFFF7.Cells(AAPP2, 2567 + (AAPP8 - 2) * 2 + 1) = "" Then

ZZFFF7.Cells(AAPP2, 2567 + (AAPP8 - 2) * 2) = ""

ZZFFF7.Cells(AAPP2, 2567 + (AAPP8 - 2) * 2 + 1) = ""

End If

AAAZ3 = ZZFFF2.Cells(AAPP5, 49)

ZZFFF4.Cells(AAAZ3, AAPP6) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 1) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 2) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 3) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 4) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 5) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 6) = ""

ZZFFF4.Cells(4, AAPP6 + 3).FormulaR1C1 = "=SUM(R[5]C:R[1048567]C)"

ZZFFF4.Cells(4, AAPP6 + 3) = ZZFFF4.Cells(4, AAPP6 + 3)

ZZFFF4.Cells(5, AAPP6 + 4).FormulaR1C1 = "=SUM(R[4]C:R[1048566]C)"

ZZFFF4.Cells(5, AAPP6 + 4) = ZZFFF4.Cells(5, AAPP6 + 4)

If ZZFFF4.Cells(4, AAPP6 + 3) <> "" And ZZFFF4.Cells(4, AAPP6 + 3) <> 0 Then

ZZFFF4.Cells(6, AAPP6) = Round(ZZFFF4.Cells(5, AAPP6 + 4) / ZZFFF4.Cells(4, AAPP6 + 3), 2)

Else:

ZZFFF4.Cells(6, AAPP6) = ""

End If

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) = ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) + CDbl(TextBox49.Value)

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) = ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) + CDbl(Label114.Caption)

ZZFFF3.Cells(AAPP3, 44 + (AAPP8 - 2) * 2) = ZZFFF3.Cells(AAPP3, 44 + (AAPP8 - 2) * 2) - CDbl(TextBox49.Value)

If ZZFFF3.Cells(AAPP3, 44 + (AAPP8 - 2) * 2) <= 0.001 Then

ZZFFF3.Cells(AAPP3, 44 + (AAPP8 - 2) * 2) = ""

End If

ZZFFF3.Cells(AAPP3, 44 + (AAPP8 - 2) * 2 + 1) = ZZFFF3.Cells(AAPP3, 44 + (AAPP8 - 2) * 2 + 1) - CDbl(Label114.Caption)

If ZZFFF3.Cells(AAPP3, 44 + (AAPP8 - 2) * 2 + 1) <= 0.001 Then

ZZFFF3.Cells(AAPP3, 44 + (AAPP8 - 2) * 2 + 1) = ""

End If

If ZZFFF3.Cells(AAPP3, 44 + (AAPP8 - 2) * 2) = "" Or ZZFFF3.Cells(AAPP3, 44 + (AAPP8 - 2) * 2 + 1) = "" Then

ZZFFF3.Cells(AAPP3, 44 + (AAPP8 - 2) * 2) = ""

ZZFFF3.Cells(AAPP3, 44 + (AAPP8 - 2) * 2 + 1) = ""

End If

AAAZ3 = ZZFFF2.Cells(AAPP5, 57).Value

ZZFFF6.Cells(AAAZ3, AAPP7) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 1) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 2) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 3) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 4) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 5) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 6) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 7) = ""

ZZFFF6.Cells(2, AAPP7 + 5).FormulaR1C1 = "=SUM(R[3]C:R[1048569]C)"

ZZFFF6.Cells(2, AAPP7 + 5) = ZZFFF6.Cells(2, AAPP7 + 5)

ZZFFF6.Cells(3, AAPP7 + 6).FormulaR1C1 = "=SUM(R[2]C:R[1048568]C)"

ZZFFF6.Cells(3, AAPP7 + 6) = ZZFFF6.Cells(3, AAPP7 + 6)

AAAZ3 = ZZFFF2.Cells(AAPP5, 58).Value

ZZFFF6.Cells(AAAZ3, AAPP9) = ""

ZZFFF6.Cells(AAAZ3, AAPP9 + 1) = ""

ZZFFF6.Cells(AAAZ3, AAPP9 + 2) = ""

ZZFFF6.Cells(AAAZ3, AAPP9 + 3) = ""

ZZFFF6.Cells(AAAZ3, AAPP9 + 4) = ""

ZZFFF6.Cells(AAAZ3, AAPP9 + 5) = ""

ZZFFF6.Cells(AAAZ3, AAPP9 + 6) = ""

ZZFFF6.Cells(AAAZ3, AAPP9 + 7) = ""

ZZFFF6.Cells(2, AAPP9 + 5).FormulaR1C1 = "=SUM(R[3]C:R[1048569]C)"

ZZFFF6.Cells(2, AAPP9 + 5) = ZZFFF6.Cells(2, AAPP9 + 5)

ZZFFF6.Cells(3, AAPP9 + 6).FormulaR1C1 = "=SUM(R[2]C:R[1048568]C)"

ZZFFF6.Cells(3, AAPP9 + 6) = ZZFFF6.Cells(3, AAPP9 + 6)

ZZFFF5.Cells(AAPP4, 3) = ZZFFF6.Cells(2, AAPP7 + 5)

ZZFFF5.Cells(AAPP4, 4) = ZZFFF6.Cells(3, AAPP7 + 6)

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2) = ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2) + ZZFFF2.Cells(AAPP1, 7).Value

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) = ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) + ZZFFF2.Cells(AAPP1, 8).Value

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2) = ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2) + ZZFFF2.Cells(AAPP1, 7).Value

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) = ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) + ZZFFF2.Cells(AAPP1, 8).Value

ZZFFF5.Cells(AAPP8, 3) = ZZFFF6.Cells(2, AAPP9 + 5)

If ZZFFF5.Cells(AAPP8, 3) <= 0.001 Then

ZZFFF5.Cells(AAPP8, 3) = ""

End If

ZZFFF5.Cells(AAPP8, 4) = ZZFFF6.Cells(3, AAPP9 + 6)

If ZZFFF5.Cells(AAPP8, 4) <= 0.001 Then

ZZFFF5.Cells(AAPP8, 4) = ""

End If

ZZFFF5.Cells(AAPP8, 7 + (AAPP3 - 2) * 2) = ZZFFF5.Cells(AAPP8, 7 + (AAPP3 - 2) * 2) - ZZFFF2.Cells(AAPP1, 7).Value

If ZZFFF5.Cells(AAPP8, 7 + (AAPP3 - 2) * 2) <= 0.001 Then

ZZFFF5.Cells(AAPP8, 7 + (AAPP3 - 2) * 2) = ""

End If

ZZFFF5.Cells(AAPP8, 7 + (AAPP3 - 2) * 2 + 1) = ZZFFF5.Cells(AAPP8, 7 + (AAPP3 - 2) * 2 + 1) - ZZFFF2.Cells(AAPP1, 8).Value

If ZZFFF5.Cells(AAPP8, 7 + (AAPP3 - 2) * 2 + 1) <= 0.001 Then

ZZFFF5.Cells(AAPP8, 7 + (AAPP3 - 2) * 2 + 1) = ""

End If

ZZFFF5.Cells(AAPP8, 2529 + (AAPP2 - 2) * 2) = ZZFFF5.Cells(AAPP8, 2529 + (AAPP2 - 2) * 2) - ZZFFF2.Cells(AAPP1, 7).Value

If ZZFFF5.Cells(AAPP8, 2529 + (AAPP2 - 2) * 2) <= 0.001 Then

ZZFFF5.Cells(AAPP8, 2529 + (AAPP2 - 2) * 2) = ""

End If

ZZFFF5.Cells(AAPP8, 2529 + (AAPP2 - 2) * 2 + 1) = ZZFFF5.Cells(AAPP8, 2529 + (AAPP2 - 2) * 2 + 1) - ZZFFF2.Cells(AAPP1, 8).Value

If ZZFFF5.Cells(AAPP8, 2529 + (AAPP2 - 2) * 2 + 1) <= 0.001 Then

ZZFFF5.Cells(AAPP8, 2529 + (AAPP2 - 2) * 2 + 1) = ""

End If

AAPP3 = ZZFFF2.Cells(AAPP5, 44)

AAPP2 = ZZFFF2.Cells(AAPP5, 45) - 2

AAPP4 = ZZFFF2.Cells(AAPP5, 46) - 2

AAAZ = ZZFFF3.Cells(AAPP3, 16383) + AAPP2

AAAC = ZZFFF3.Cells(AAPP3, 16384)

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) + ZZFFF2.Cells(AAPP1, 7).Value

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) + ZZFFF2.Cells(AAPP1, 8).Value

AAPP3 = ZZFFF2.Cells(AAPP5, 44)

AAPP2 = ZZFFF2.Cells(AAPP5, 45) - 2

AAPP8 = ZZFFF2.Cells(AAPP5, 55) - 2

AAAZ = ZZFFF3.Cells(AAPP3, 16383) + AAPP2

AAAC = ZZFFF3.Cells(AAPP3, 16384)

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP8)) = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP8)) - ZZFFF2.Cells(AAPP1, 7).Value

If ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP8)) <= 0.001 Then

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP8)) = ""

End If

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP8) + 1) = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP8) + 1) - ZZFFF2.Cells(AAPP1, 8).Value

If ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP8) + 1) <= 0.001 Then

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP8) + 1) = ""

End If

ZZFFF2.Cells(AAPP1, 1).Value = ""

ZZFFF2.Cells(AAPP1, 2).Value = ""

ZZFFF2.Cells(AAPP1, 3).Value = ""

ZZFFF2.Cells(AAPP1, 4).Value = ""

ZZFFF2.Cells(AAPP1, 5).Value = ""

ZZFFF2.Cells(AAPP1, 6).Value = ""

ZZFFF2.Cells(AAPP1, 7).Value = ""

ZZFFF2.Cells(AAPP1, 8).Value = ""

ZZFFF2.Cells(AAPP1, 9).Value = ""

ZZFFF2.Cells(AAPP1, 10).Value = ""

ZZFFF2.Cells(AAPP5, 42).Value = ""

ZZFFF2.Cells(AAPP5, 43).Value = ""

ZZFFF2.Cells(AAPP5, 45).Value = ""

ZZFFF2.Cells(AAPP5, 44).Value = ""

ZZFFF2.Cells(AAPP5, 45).Value = ""

ZZFFF2.Cells(AAPP5, 46).Value = ""

ZZFFF2.Cells(AAPP5, 47).Value = ""

ZZFFF2.Cells(AAPP5, 48).Value = ""

ZZFFF2.Cells(AAPP5, 49).Value = ""

ZZFFF2.Cells(AAPP5, 50).Value = ""

ZZFFF2.Cells(AAPP5, 55).Value = ""

ZZFFF2.Cells(AAPP5, 56).Value = ""

ZZFFF2.Cells(AAPP5, 57).Value = ""

ZZFFF2.Cells(AAPP5, 58).Value = ""

Call ZLIPA2

With ZZFFF2

ComboBox32.RowSource = .Range(.Cells(8, 42), .Cells(.Cells(Rows.Count, 42).End(xlUp).Row, 42)).Address(External:=True)

End With

ComboBox32.SetFocus

TextBox2.Value = ComboBox36.Value

ComboBox36.Clear

For SCHOT = 1 To 2047

AAAC = 44 + ((SCHOT - 1) * 2)

If ZZFFF3.Cells(AAPP3, AAAC) <> "" Then

With ComboBox36

.AddItem ZZFFF5.Cells(SCHOT + 1, 2).Value

End With

End If

Next SCHOT

ComboBox36.Value = TextBox2.Value

MsgBox "ID-Nr. " & ZZFFF2.[k1] & " ist gelöscht!", 48, "http://excel.hpage.de    "

ZZFFF2.[k1] = ""

TextBox46.Value = ""

End If

Exit Sub

EERR:

End Sub

 

Private Sub TextBox42_Change()

On Error GoTo EERR

If TextBox42.Value <> "" Then

Dim AAAC As Long

Dim ECHER As Variant

Dim AAPP1 As Long

Dim AAPP2 As Long

Dim AAPP3 As Long

Dim AAPP4 As Long

Dim AAPP5 As Long

Dim AAPP6 As Long

Dim AAPP7 As Long

Dim AAAZ As Long

Dim AAAZ2 As Long

Dim AAAZ3 As Long

ComboBox25.SetFocus

ECHER = ComboBox25.Value

ComboBox25.Value = "kkk"

ComboBox25.Value = ECHER

ComboBox25.SetFocus

If ComboBox27.Value = "" Then

MsgBox "Diese ID-Nr. kann nicht gelöscht werden, Artikelkonto aus dem Eintrag existiert nicht mehr!", 48, "http://excel.hpage.de"

ComboBox27.SetFocus

Exit Sub

End If

If ComboBox26.Value = "" Then

MsgBox "Diese ID-Nr. kann nicht gelöscht werden, Lieferantenkonto aus dem Eintrag existiert nicht mehr!", 48, "http://excel.hpage.de"

ComboBox26.SetFocus

Exit Sub

End If

If ComboBox29.Value = "" Then

MsgBox "Diese ID-Nr. kann nicht gelöscht werden, Lagerplatzkonto aus dem Eintrag existiert nicht mehr!", 48, "http://excel.hpage.de"

ComboBox29.SetFocus

Exit Sub

End If

If Label149.Caption = "" Then

MsgBox "Diese ID-Nr. kann nicht gelöscht werden, es gibt keinen ausgewählten Artikel vom ausgewählten Lieferant auf dem ausgewählten Lagerplatz!", 48, "http://excel.hpage.de"

ComboBox25.SetFocus

Exit Sub

End If

ZZFFF2.[k1] = ComboBox25.Value

AAPP1 = CDbl(ZZFFF2.Range("a7:a1048571").Cells.Find(What:=ComboBox25.Value, lookat:=xlWhole).Row)

AAPP5 = CDbl(ZZFFF2.Range("ac7:ac1048571").Cells.Find(What:=ComboBox25.Value, lookat:=xlWhole).Row)

AAPP2 = ZZFFF2.Cells(AAPP5, 32)

AAPP3 = ZZFFF2.Cells(AAPP5, 31)

AAPP4 = ZZFFF2.Cells(AAPP5, 33)

AAPP6 = ZZFFF2.Cells(AAPP5, 35)

AAPP7 = ZZFFF2.Cells(AAPP5, 37)

AAAZ2 = ZZFFF2.Cells(AAPP5, 34)

ZZFFF7.Cells(AAPP2, 13) = ZZFFF7.Cells(AAPP2, 13) - ZZFFF2.Cells(AAPP1, 7).Value

If ZZFFF7.Cells(AAPP2, 13) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 13) = ""

End If

ZZFFF7.Cells(AAPP2, 14) = ZZFFF7.Cells(AAPP2, 14) - ZZFFF2.Cells(AAPP1, 8).Value

If ZZFFF7.Cells(AAPP2, 14) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 14) = ""

End If

ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2 + 1) = ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2 + 1) - ZZFFF2.Cells(AAPP1, 8)

If ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2 + 1) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 45 + (AAPP3 - 2) * 2 + 1) = ""

End If

ZZFFF7.Cells(AAPP2, 6664 + (AAPP3 - 2) * 2 + 1) = ZZFFF7.Cells(AAPP2, 6664 + (AAPP3 - 2) * 2 + 1) - ZZFFF2.Cells(AAPP1, 8)

If ZZFFF7.Cells(AAPP2, 6664 + (AAPP3 - 2) * 2 + 1) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 6664 + (AAPP3 - 2) * 2 + 1) = ""

End If

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) = ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) - ZZFFF2.Cells(AAPP1, 8)

If ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) = ""

End If

If ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) <= 0.001 Then

ZZFFF7.Cells(AAPP2, 2567 + (AAPP4 - 2) * 2 + 1) = ""

End If

AAAZ3 = ZZFFF2.Cells(AAPP5, 36)

ZZFFF4.Cells(AAAZ3, AAPP6) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 1) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 2) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 3) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 4) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 5) = ""

ZZFFF4.Cells(AAAZ3, AAPP6 + 6) = ""

ZZFFF4.Cells(4, AAPP6 + 3).FormulaR1C1 = "=SUM(R[5]C:R[1048567]C)"

ZZFFF4.Cells(4, AAPP6 + 3) = ZZFFF4.Cells(4, AAPP6 + 3)

ZZFFF4.Cells(5, AAPP6 + 4).FormulaR1C1 = "=SUM(R[4]C:R[1048566]C)"

ZZFFF4.Cells(5, AAPP6 + 4) = ZZFFF4.Cells(5, AAPP6 + 4)

If ZZFFF4.Cells(4, AAPP6 + 3) <> "" And ZZFFF4.Cells(4, AAPP6 + 3) <> 0 Then

ZZFFF4.Cells(6, AAPP6) = Round(ZZFFF4.Cells(5, AAPP6 + 4) / ZZFFF4.Cells(4, AAPP6 + 3), 2)

Else:

ZZFFF4.Cells(6, AAPP6) = ""

End If

ZZFFF3.Cells(AAPP3, 6) = ZZFFF4.Cells(4, AAPP6 + 3)

If ZZFFF3.Cells(AAPP3, 6) = 0 Then

ZZFFF3.Cells(AAPP3, 6) = ""

End If

ZZFFF3.Cells(AAPP3, 7) = ZZFFF4.Cells(5, AAPP6 + 4)

If ZZFFF3.Cells(AAPP3, 7) = 0 Then

ZZFFF3.Cells(AAPP3, 7) = ""

End If

ZZFFF3.Cells(AAPP3, 8) = ZZFFF4.Cells(6, AAPP6)

If ZZFFF3.Cells(AAPP3, 8) <= 0.001 Then

ZZFFF3.Cells(AAPP3, 8) = ""

End If

ZZFFF3.Cells(AAPP3, 13) = ZZFFF3.Cells(AAPP3, 13) - ZZFFF2.Cells(AAPP1, 7)

If ZZFFF3.Cells(AAPP3, 13) <= 0.001 Then

ZZFFF3.Cells(AAPP3, 13) = ""

End If

ZZFFF3.Cells(AAPP3, 14) = ZZFFF3.Cells(AAPP3, 14) - ZZFFF2.Cells(AAPP1, 8)

If ZZFFF3.Cells(AAPP3, 14) <= 0.001 Then

ZZFFF3.Cells(AAPP3, 14) = ""

End If

If ZZFFF3.Cells(AAPP3, 13) > 0 Then

ZZFFF3.Cells(AAPP3, 15) = Round(ZZFFF3.Cells(AAPP3, 14) / ZZFFF3.Cells(AAPP3, 13), 2)

Else:

ZZFFF3.Cells(AAPP3, 15) = ""

End If

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) = ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) - ZZFFF2.Cells(AAPP1, 7).Value

If ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) = 0 Then

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2) = ""

End If

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) = ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) - ZZFFF2.Cells(AAPP1, 8).Value

If ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) = 0 Then

ZZFFF3.Cells(AAPP3, 44 + (AAPP4 - 2) * 2 + 1) = ""

End If

AAAZ3 = ZZFFF2.Cells(AAPP5, 38).Value

ZZFFF6.Cells(AAAZ3, AAPP7) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 1) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 2) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 3) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 4) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 5) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 6) = ""

ZZFFF6.Cells(AAAZ3, AAPP7 + 7) = ""

ZZFFF6.Cells(2, AAPP7 + 5).FormulaR1C1 = "=SUM(R[3]C:R[1048569]C)"

ZZFFF6.Cells(2, AAPP7 + 5) = ZZFFF6.Cells(2, AAPP7 + 5)

ZZFFF6.Cells(3, AAPP7 + 6).FormulaR1C1 = "=SUM(R[2]C:R[1048568]C)"

ZZFFF6.Cells(3, AAPP7 + 6) = ZZFFF6.Cells(3, AAPP7 + 6)

ZZFFF5.Cells(AAPP4, 3) = ZZFFF6.Cells(2, AAPP7 + 5)

If ZZFFF5.Cells(AAPP4, 3) <= 0.001 Then

ZZFFF5.Cells(AAPP4, 3) = ""

End If

ZZFFF5.Cells(AAPP4, 4) = ZZFFF6.Cells(3, AAPP7 + 6)

If ZZFFF5.Cells(AAPP4, 4) <= 0.001 Then

ZZFFF5.Cells(AAPP4, 4) = ""

End If

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) = ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) - ZZFFF2.Cells(AAPP1, 8).Value

If ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) <= 0.001 Then

ZZFFF5.Cells(AAPP4, 7 + (AAPP3 - 2) * 2 + 1) = ""

End If

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) = ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) - ZZFFF2.Cells(AAPP1, 8).Value

If ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) <= 0.001 Then

ZZFFF5.Cells(AAPP4, 2529 + (AAPP2 - 2) * 2 + 1) = ""

End If

AAPP3 = ZZFFF2.Cells(AAPP5, 31)

AAPP2 = ZZFFF2.Cells(AAPP5, 32) - 2

AAPP4 = ZZFFF2.Cells(AAPP5, 33) - 2

AAAZ = ZZFFF3.Cells(AAPP3, 16383) + AAPP2

AAAC = ZZFFF3.Cells(AAPP3, 16384)

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) - ZZFFF2.Cells(AAPP1, 7).Value

If ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) <= 0.001 Then

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4)) = ""

End If

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) = ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) - ZZFFF2.Cells(AAPP1, 8).Value

If ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) <= 0.001 Then

ZZFFF3.Cells(AAAZ, AAAC + (2 * AAPP4) + 1) = ""

End If

ZZFFF2.Cells(AAPP1, 1).Value = ""

ZZFFF2.Cells(AAPP1, 2).Value = ""

ZZFFF2.Cells(AAPP1, 3).Value = ""

ZZFFF2.Cells(AAPP1, 4).Value = ""

ZZFFF2.Cells(AAPP1, 5).Value = ""

ZZFFF2.Cells(AAPP1, 6).Value = ""

ZZFFF2.Cells(AAPP1, 7).Value = ""

ZZFFF2.Cells(AAPP1, 8).Value = ""

ZZFFF2.Cells(AAPP1, 9).Value = ""

ZZFFF2.Cells(AAPP1, 10).Value = ""

ZZFFF2.Cells(AAPP5, 29).Value = ""

ZZFFF2.Cells(AAPP5, 30).Value = ""

ZZFFF2.Cells(AAPP5, 34).Value = ""

ZZFFF2.Cells(AAPP5, 31).Value = ""

ZZFFF2.Cells(AAPP5, 32).Value = ""

ZZFFF2.Cells(AAPP5, 33).Value = ""

ZZFFF2.Cells(AAPP5, 35).Value = ""

ZZFFF2.Cells(AAPP5, 37).Value = ""

ZZFFF2.Cells(AAPP5, 36).Value = ""

ZZFFF2.Cells(AAPP5, 38).Value = ""

ZZFFF2.Cells(AAPP5, 39).Value = ""

ZZFFF2.Cells(AAPP5, 40).Value = ""

ZZFFF2.Cells(AAPP5, 41).Value = ""

Call ZLIPA2

With ZZFFF2

ComboBox25.RowSource = .Range(.Cells(8, 29), .Cells(.Cells(Rows.Count, 29).End(xlUp).Row, 29)).Address(External:=True)

End With

ComboBox25.SetFocus

MsgBox "ID-Nr. " & ZZFFF2.[k1] & " ist gelöscht!", 48, "http://excel.hpage.de    "

ZZFFF2.[k1] = ""

TextBox42.Value = ""

End If

Exit Sub

EERR:

End Sub

 

Sub ZZUUFF()

On Error Resume Next

Dim SCHRI As String

Dim TSCH As Long

Dim ††† As Long

SCHRI = ""

SCHRI = ZZFFF1.Name

If SCHRI = "" Then

MsgBox "Fehler im Schritt 1!", , "http://excel.hpage.de"

End If

SCHRI = ""

SCHRI = ZZFFF2.Name

If SCHRI = "" Then

MsgBox "Fehler im Schritt 11!", , "http://excel.hpage.de"

End If

SCHRI = ""

SCHRI = ZZFFF3.Name

If SCHRI = "" Then

MsgBox "Fehler im Schritt 12!", , "http://excel.hpage.de"

End If

SCHRI = ""

SCHRI = ZZFFF4.Name

If SCHRI = "" Then

MsgBox "Fehler im Schritt 13!", , "http://excel.hpage.de"

End If

SCHRI = ""

SCHRI = ZZFFF5.Name

If SCHRI = "" Then

MsgBox "Fehler im Schritt 14!", , "http://excel.hpage.de"

End If

SCHRI = ""

SCHRI = ZZFFF6.Name

If SCHRI = "" Then

MsgBox "Fehler im Schritt 15!", , "http://excel.hpage.de"

End If

SCHRI = ""

SCHRI = ZZFFF7.Name

If SCHRI = "" Then

MsgBox "Fehler im Schritt 16!", , "http://excel.hpage.de"

End If

SCHRI = ""

SCHRI = ZZFFF8.Name

If SCHRI = "" Then

MsgBox "Fehler im Schritt 17!", , "http://excel.hpage.de"

End If

SCHRI = ""

SCHRI = ZZFFF9.Name

If SCHRI = "" Then

MsgBox "Fehler im Schritt 18!", , "http://excel.hpage.de"

End If

SCHRI = ""

SCHRI = ZZFFF10.Name

If SCHRI = "" Then

MsgBox "Fehler im Schritt 19!", , "http://excel.hpage.de"

End If

SCHRI = ""

SCHRI = ZZFFF11.Name

If SCHRI = "" Then

MsgBox "Fehler im Schritt 20!", , "http://excel.hpage.de"

End If

SCHRI = ""

SCHRI = ZZFFF12.Name

If SCHRI = "" Then

MsgBox "Fehler im Schritt 21!", , "http://excel.hpage.de"

End If

For ††† = 1 To 10

TSCH = 1000000

TSCH = Me.Controls("CommandButton" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 21 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 1 To 6

TSCH = 1000000

TSCH = Me.Controls("TextBox" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 31 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 1 To 10

TSCH = 1000000

TSCH = Me.Controls("Frame" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 37 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 1 To 12

TSCH = 1000000

TSCH = Me.Controls("Label" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 47 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 1 To 4

TSCH = 1000000

TSCH = Me.Controls("CheckBox" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 59 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 1 To 4

TSCH = 1000000

TSCH = Me.Controls("ComboBox" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 63 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 7 To 16

TSCH = 1000000

TSCH = Me.Controls("TextBox" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 61 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 11 To 18

TSCH = 1000000

TSCH = Me.Controls("CommandButton" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 67 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

TSCH = 1000000

TSCH = Image1.Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt 86!", , "http://excel.hpage.de"

End If

TSCH = 1000000

TSCH = ListBox1.Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt 87!", , "http://excel.hpage.de"

End If

For ††† = 13 To 28

TSCH = 1000000

TSCH = Me.Controls("Label" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 75 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 5 To 10

TSCH = 1000000

TSCH = Me.Controls("ComboBox" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 99 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 17 To 26

TSCH = 1000000

TSCH = Me.Controls("TextBox" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 93 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 19 To 22

TSCH = 1000000

TSCH = Me.Controls("CommandButton" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 101 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

TSCH = 1000000

TSCH = ListBox2.Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt 124!", , "http://excel.hpage.de"

End If

For ††† = 29 To 43

TSCH = 1000000

TSCH = Me.Controls("Label" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 96 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 11 To 15

TSCH = 1000000

TSCH = Me.Controls("ComboBox" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 129 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 27 To 36

TSCH = 1000000

TSCH = Me.Controls("TextBox" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 118 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 23 To 26

TSCH = 1000000

TSCH = Me.Controls("CommandButton" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 132 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

TSCH = 1000000

TSCH = ListBox3.Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt 159!", , "http://excel.hpage.de"

End If

For ††† = 11 To 13

TSCH = 1000000

TSCH = Me.Controls("Frame" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 153 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 44 To 114

TSCH = 1000000

TSCH = Me.Controls("Label" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 123 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 16 To 24

TSCH = 1000000

TSCH = Me.Controls("ComboBox" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 222 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 37 To 41

TSCH = 1000000

TSCH = Me.Controls("TextBox" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 210 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 27 To 30

TSCH = 1000000

TSCH = Me.Controls("CommandButton" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 225 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

TSCH = 1000000

TSCH = Image2.Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt 256!", , "http://excel.hpage.de"

End If

TSCH = 1000000

TSCH = ListBox4.Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt 257!", , "http://excel.hpage.de"

End If

For ††† = 14 To 16

TSCH = 1000000

TSCH = Me.Controls("Frame" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 245 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 115 To 170

TSCH = 1000000

TSCH = Me.Controls("Label" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 147 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 25 To 31

TSCH = 1000000

TSCH = Me.Controls("ComboBox" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 293 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 42 To 45

TSCH = 1000000

TSCH = Me.Controls("TextBox" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 283 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 31 To 34

TSCH = 1000000

TSCH = Me.Controls("CommandButton" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 298 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

TSCH = 1000000

TSCH = Image3.Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt 333!", , "http://excel.hpage.de"

End If

TSCH = 1000000

TSCH = ListBox5.Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt 334!", , "http://excel.hpage.de"

End If

For ††† = 17 To 19

TSCH = 1000000

TSCH = Me.Controls("Frame" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 319 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 171 To 238

TSCH = 1000000

TSCH = Me.Controls("Label" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 168 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 32 To 39

TSCH = 1000000

TSCH = Me.Controls("ComboBox" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 375 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 46 To 50

TSCH = 1000000

TSCH = Me.Controls("TextBox" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 369 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 35 To 38

TSCH = 1000000

TSCH = Me.Controls("CommandButton" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 385 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

TSCH = 1000000

TSCH = Image4.Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt 424!", , "http://excel.hpage.de"

End If

TSCH = 1000000

TSCH = ListBox6.Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt 425!", , "http://excel.hpage.de"

End If

For ††† = 20 To 25

TSCH = 1000000

TSCH = Me.Controls("Frame" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 407 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 239 To 312

TSCH = 1000000

TSCH = Me.Controls("Label" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 194 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 40 To 48

TSCH = 1000000

TSCH = Me.Controls("ComboBox" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 467 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 39 To 42

TSCH = 1000000

TSCH = Me.Controls("CommandButton" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 477 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

For ††† = 51 To 54

TSCH = 1000000

TSCH = Me.Controls("TextBox" & CStr(†††)).Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt " & 469 + ††† & "!", , "http://excel.hpage.de"

End If

Next †††

TSCH = 1000000

TSCH = Image5.Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt 524!", , "http://excel.hpage.de"

End If

TSCH = 1000000

TSCH = ListBox7.Left

If TSCH = 1000000 Then

MsgBox "Fehler im Schritt 525!", , "http://excel.hpage.de"

End If

End Sub

 

Sub ZZZUUFAF()

On Error GoTo ERR

TBB1.BackColor = &HC0FFFF

TBB2.BackColor = &HC0FFFF

KuNr.Enabled = True

KuNr.BackColor = &HC0FFFF

Dim IC As String

IC = CoB1

 If CoB1 > "" Then

Sheets(IC).Activate

End If

If ActiveSheet.Name <> "Zailer" And ActiveSheet.Name <> "POMO" Then

Dim AAAZ As Variant

Dim AAAC As Variant

POMO.[a2] = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row

POMO.[a3] = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Column

AAAZ = CDbl(POMO.[a2])

AAAC = CDbl(POMO.[a3])

SPALTA1 = ""

SPALTA2 = ""

SPALTA3 = ""

SPALTA4 = ""

SPALTA5 = ""

SPALTA6 = ""

SPALTA7 = ""

SPALTB1 = ""

SPALTB2 = ""

SPALTB3 = ""

SPALTB4 = ""

SPALTB5 = ""

SPALTB6 = ""

SPALTB7 = ""

SPALTC1 = ""

SPALTC2 = ""

SPALTC3 = ""

SPALTC4 = ""

SPALTC5 = ""

SPALTC6 = ""

SPALTC7 = ""

SPALTD1 = ""

SPALTD2 = ""

SPALTD3 = ""

SPALTD4 = ""

SPALTD5 = ""

SPALTD6 = ""

SPALTD7 = ""

SPALTE1 = ""

SPALTE2 = ""

SPALTE3 = ""

SPALTE4 = ""

SPALTE5 = ""

SPALTE6 = ""

SPALTE7 = ""

SPALTF1 = ""

SPALTF2 = ""

SPALTF3 = ""

SPALTF4 = ""

SPALTF5 = ""

SPALTF6 = ""

SPALTF7 = ""

SPALTG1 = ""

SPALTG2 = ""

SPALTG3 = ""

SPALTG4 = ""

SPALTG5 = ""

SPALTG6 = ""

SPALTG7 = ""

SPALTA = ""

SPALTB = ""

SPALTC = ""

SPALTD = ""

SPALTE = ""

SPALTF = ""

SPALTG = ""

KuNr = ""

TBB1.Value = ""

TBB2.Value = ""

TBB3.Value = ""

TBB4.Value = ""

TBB5.Value = ""

TBB6.Value = ""

POMO.[a1] = ""

POMO.[b1] = ""

POMO.[c1] = ""

POMO.[d1] = ""

POMO.[e1] = ""

POMO.[F1] = ""

POMO.[g1] = ""

POMO.[h1] = ""

POMO.[i1] = ""

POMO.[j1] = ""

POMO.[k1] = ""

POMO.[L1] = ""

POMO.[m1] = ""

If POMO.[a2] < 65536 Then

Dim ††† As Variant

If POMO.[a3] = 1 Then

POMO.[a4] = 0

††† = POMO.[a4]

End If

If POMO.[a3] = 7 Then

POMO.[a4] = 6

††† = POMO.[a4]

End If

SPALTA = ActiveSheet.Cells(1, AAAC - †††).Value

SPALTB = ActiveSheet.Cells(1, AAAC + 1).Value

SPALTC = ActiveSheet.Cells(1, AAAC + 2).Value

SPALTD = ActiveSheet.Cells(1, AAAC + 3).Value

SPALTE = ActiveSheet.Cells(1, AAAC + 4).Value

SPALTF = ActiveSheet.Cells(1, AAAC + 5).Value

SPALTG = ActiveSheet.Cells(1, AAAC + 6).Value

If POMO.[a2] > 8 Then

SPALTA1 = ActiveSheet.Cells(AAAZ - 6, AAAC - †††).Value

SPALTB1 = ActiveSheet.Cells(AAAZ - 6, AAAC + 1).Value

SPALTC1 = ActiveSheet.Cells(AAAZ - 6, AAAC + 2).Value

SPALTD1 = ActiveSheet.Cells(AAAZ - 6, AAAC + 3).Value

SPALTE1 = ActiveSheet.Cells(AAAZ - 6, AAAC + 4).Value

SPALTF1 = ActiveSheet.Cells(AAAZ - 6, AAAC + 5).Value

SPALTG1 = ActiveSheet.Cells(AAAZ - 6, AAAC + 6).Value

End If

If POMO.[a2] > 7 Then

SPALTA2 = ActiveSheet.Cells(AAAZ - 5, AAAC - †††).Value

SPALTB2 = ActiveSheet.Cells(AAAZ - 5, AAAC + 1).Value

SPALTC2 = ActiveSheet.Cells(AAAZ - 5, AAAC + 2).Value

SPALTD2 = ActiveSheet.Cells(AAAZ - 5, AAAC + 3).Value

SPALTE2 = ActiveSheet.Cells(AAAZ - 5, AAAC + 4).Value

SPALTF2 = ActiveSheet.Cells(AAAZ - 5, AAAC + 5).Value

SPALTG2 = ActiveSheet.Cells(AAAZ - 5, AAAC + 6).Value

End If

If POMO.[a2] > 6 Then

SPALTA3 = ActiveSheet.Cells(AAAZ - 4, AAAC - †††).Value

SPALTB3 = ActiveSheet.Cells(AAAZ - 4, AAAC + 1).Value

SPALTC3 = ActiveSheet.Cells(AAAZ - 4, AAAC + 2).Value

SPALTD3 = ActiveSheet.Cells(AAAZ - 4, AAAC + 3).Value

SPALTE3 = ActiveSheet.Cells(AAAZ - 4, AAAC + 4).Value

SPALTF3 = ActiveSheet.Cells(AAAZ - 4, AAAC + 5).Value

SPALTG3 = ActiveSheet.Cells(AAAZ - 4, AAAC + 6).Value

End If

If POMO.[a2] > 5 Then

SPALTA4 = ActiveSheet.Cells(AAAZ - 3, AAAC - †††).Value

SPALTB4 = ActiveSheet.Cells(AAAZ - 3, AAAC + 1).Value

SPALTC4 = ActiveSheet.Cells(AAAZ - 3, AAAC + 2).Value

SPALTD4 = ActiveSheet.Cells(AAAZ - 3, AAAC + 3).Value

SPALTE4 = ActiveSheet.Cells(AAAZ - 3, AAAC + 4).Value

SPALTF4 = ActiveSheet.Cells(AAAZ - 3, AAAC + 5).Value

SPALTG4 = ActiveSheet.Cells(AAAZ - 3, AAAC + 6).Value

End If

If POMO.[a2] > 4 Then

SPALTA5 = ActiveSheet.Cells(AAAZ - 2, AAAC - †††).Value

SPALTB5 = ActiveSheet.Cells(AAAZ - 2, AAAC + 1).Value

SPALTC5 = ActiveSheet.Cells(AAAZ - 2, AAAC + 2).Value

SPALTD5 = ActiveSheet.Cells(AAAZ - 2, AAAC + 3).Value

SPALTE5 = ActiveSheet.Cells(AAAZ - 2, AAAC + 4).Value

SPALTF5 = ActiveSheet.Cells(AAAZ - 2, AAAC + 5).Value

SPALTG5 = ActiveSheet.Cells(AAAZ - 2, AAAC + 6).Value

End If

If POMO.[a2] > 3 Then

SPALTA6 = ActiveSheet.Cells(AAAZ - 1, AAAC - †††).Value

SPALTB6 = ActiveSheet.Cells(AAAZ - 1, AAAC + 1).Value

SPALTC6 = ActiveSheet.Cells(AAAZ - 1, AAAC + 2).Value

SPALTD6 = ActiveSheet.Cells(AAAZ - 1, AAAC + 3).Value

SPALTE6 = ActiveSheet.Cells(AAAZ - 1, AAAC + 4).Value

SPALTF6 = ActiveSheet.Cells(AAAZ - 1, AAAC + 5).Value

SPALTG6 = ActiveSheet.Cells(AAAZ - 1, AAAC + 6).Value

End If

If POMO.[a2] > 2 Then

SPALTA7 = ActiveSheet.Cells(AAAZ, AAAC - †††).Value

SPALTB7 = ActiveSheet.Cells(AAAZ, AAAC + 1).Value

SPALTC7 = ActiveSheet.Cells(AAAZ, AAAC + 2).Value

SPALTD7 = ActiveSheet.Cells(AAAZ, AAAC + 3).Value

SPALTE7 = ActiveSheet.Cells(AAAZ, AAAC + 4).Value

SPALTF7 = ActiveSheet.Cells(AAAZ, AAAC + 5).Value

SPALTG7 = ActiveSheet.Cells(AAAZ, AAAC + 6).Value

End If

 End If

 End If

If ActiveSheet.Name <> "Zailer" And ActiveSheet.Name <> "POMO" Then

TANA = ActiveSheet.Name

End If

Exit Sub

ERR:

End Sub

 

 

'''3_3_LmD###########################################################################################################################