Sub
Bestellen()
Dim
Marke
As
String
Sheets(
"Bestellformular"
).
Select
Marke = Range(
"E5"
).Value
If
IsEmpty(Range(
"C5"
))
Then
MsgBox (
"Bitte Anzahl einfügen!"
)
Exit
Sub
ElseIf
IsEmpty(Range(
"D5"
))
Then
MsgBox (
"Bitte Einheit einfügen!"
)
Exit
Sub
ElseIf
IsEmpty(Range(
"E5"
))
Then
MsgBox (
"Bitte Marke einfügen!"
)
Exit
Sub
ElseIf
IsEmpty(Range(
"F5"
))
Then
MsgBox (
"Bitte Model einfügen!"
)
Exit
Sub
ElseIf
IsEmpty(Range(
"I5"
))
Then
MsgBox (
"Bitte Visum einfügen!"
)
Exit
Sub
ElseIf
IsEmpty(Range(
"K5"
))
Then
MsgBox (
"Bitte Standort einfügen!"
)
Exit
Sub
End
If
If
Marke =
"Finn Comfort"
Then
Range(
"C5:K5"
).
Select
Selection.Copy
Workbooks.Open
"I:\Domenic Stamm\Bestellung\Bestellformular.xlsm"
Workbooks(
"Bestellformular.xlsm"
).Worksheets(
"New Balance"
).
Select
Rows(
"2:2"
).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range(
"A2:I2"
).
Select
ActiveSheet.Paste
Workbooks(
"Bestellformular.xlsm"
).Close SaveChanges:=
True
ElseIf
Marke =
"New Balance"
Then
Range(
"C5:K5"
).
Select
Selection.Copy
Workbooks.Open
"I:\Domenic Stamm\Bestellung\Bestellformular.xlsm"
Workbooks(
"Bestellformular.xlsm"
).Worksheets(
"New Balance"
).
Select
Rows(
"2:2"
).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range(
"A2:I2"
).
Select
ActiveSheet.Paste
Workbooks(
"Bestellformular.xlsm"
).Close SaveChanges:=
True
ElseIf
Marke =
"FootJoy"
Then
Range(
"C5:K5"
).
Select
Selection.Copy
Workbooks.Open
"I:\Domenic Stamm\Bestellung\Bestellformular.xlsm"
Workbooks(
"Bestellformular.xlsm"
).Worksheets(
"FootJoy"
).
Select
Rows(
"2:2"
).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range(
"A2:I2"
).
Select
ActiveSheet.Paste
Workbooks(
"Bestellformular.xlsm"
).Close SaveChanges:=
True
ElseIf
Marke =
"Meindl"
Then
Range(
"C5:K5"
).
Select
Selection.Copy
Workbooks.Open
"I:\Domenic Stamm\Bestellung\Bestellformular.xlsm"
Workbooks(
"Bestellformular.xlsm"
).Worksheets(
"Meindl"
).
Select
Rows(
"2:2"
).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range(
"A2:I2"
).
Select
ActiveSheet.Paste
Workbooks(
"Bestellformular.xlsm"
).Close SaveChanges:=
True
End
If
Sheets(
"Bestellformular"
).
Select
Range(
"C5:K5"
).
Select
Selection.ClearContents
End
Sub