Private
Sub
CommandButton1_Click()
Dim
SourceFolder
As
String
, TargetFolder
As
String
, strPfad
As
String
, strAltname
As
String
strNeuname
As
String
, strprojekt
As
String
, strtalt
As
String
, strneu
As
String
, strchrometabelle
As
String
strdefault
As
String
, strneuername
As
String
If
Pfad.ComboBox1 =
"5500C"
Then
SourceFolder =
"C:\Report\5500C\Default"
TargetFolder = "C:\Report\5500C\"
Call
Shell(
"cmd.exe /c xcopy /y "
& SourceFolder &
" "
& TargetFolder & Studie.Value &
" /E /i "
)
End
If
If
Pfad.ComboBox1 =
"5500D"
Then
SourceFolder =
"C:\Report\5500D\Default"
TargetFolder = "C:\Report\5500D\"
Call
Shell(
"cmd.exe /c xcopy /y "
& SourceFolder &
" "
& TargetFolder & Studie.Value &
" /E /i "
)
End
If
SourceFolder =
"C:\Report\Ergebnisse\Default"
TargetFolder = "C:\Report\Ergebnisse\"
Call
Shell(
"cmd.exe /c xcopy /y "
& SourceFolder &
" "
& TargetFolder & Studie.Value &
" /E /i "
)
strPfad = "\"
strAltname =
"Chrom.xls"
strchrometabelle =
"Chrom-Tabelle -"
strNeuname =
"Chrom-"
& Studie.Value &
".xls"
strAlt = TargetFolder & Studie.Value & strPfad & strAltname
strneu = TargetFolder & Studie.Value & strPfad & Studie.Value
Zielpfad =
"C:\Report\Ergebnisse\" & Studie.Value & "
\
" & "
Chrome.xls"
Name TargetFolder & Studie.Value & strPfad & strAltname
As
TargetFolder & Studie.Value & strPfad & strNeuname
Unload Pfad
End
Sub
Private
Sub
Image1_BeforeDragOver(
ByVal
Cancel
As
MSForms.ReturnBoolean,
ByVal
Data
As
MSForms.DataObject,
ByVal
X
As
Single
,
ByVal
Y
As
Single
,
ByVal
DragState
As
MSForms.fmDragState,
ByVal
Effect
As
MSForms.ReturnEffect,
ByVal
Shift
As
Integer
)
End
Sub
Private
Sub
UserForm_Initialize()
With
Pfad.ComboBox1
.AddItem
"5500C"
.AddItem
"5500D"
.ListIndex = 0
End
With
End
Sub