1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
| Sub Eng()
Dim Directory As Variant
Dim T1, T2, T3, C1, New_Project
T1 = UserForm1.TextBox1 & " - "
T2 = UserForm1.TextBox2 & " - "
T3 = UserForm1.TextBox3
C1 = UserForm1.combobox1 & "\"
New_Project = "D:\Documents and Settings\be30enginering\My Documents\" & C1 & T1 & T2 & T3
Select Case True
Case UserForm1.combobox2 = "A" And Sheet2.CheckBox261
Directory = New_Project & "\" & Sheet2.Range("A69") & "\"
Case UserForm1.combobox2 = "B" And Sheet2.CheckBox262
Directory = New_Project & "\" & Sheet2.Range("A69") & "\"
Case UserForm1.combobox2 = "C" And Sheet2.CheckBox263
Directory = New_Project & "\" & Sheet2.Range("A69") & "\"
Case UserForm1.combobox2 = "D" And Sheet2.CheckBox264
Directory = New_Project & "\" & Sheet2.Range("A69") & "\"
End Select
SHCreateDirectoryEx 0&, Directory, 0&
Select Case True
Case UserForm1.combobox2 = "A" And Sheet2.CheckBox265
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B70") & "\"
Case UserForm1.combobox2 = "B" And Sheet2.CheckBox266
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B70") & "\"
Case UserForm1.combobox2 = "C" And Sheet2.CheckBox267
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B70") & "\"
Case UserForm1.combobox2 = "D" And Sheet2.CheckBox268
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B70") & "\"
End Select
SHCreateDirectoryEx 0&, Directory, 0&
Select Case True
Case UserForm1.combobox2 = "A" And Sheet2.CheckBox269
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B71") & "\"
Case UserForm1.combobox2 = "B" And Sheet2.CheckBox270
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B71") & "\"
Case UserForm1.combobox2 = "C" And Sheet2.CheckBox271
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B71") & "\"
Case UserForm1.combobox2 = "D" And Sheet2.CheckBox272
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B71") & "\"
End Select
SHCreateDirectoryEx 0&, Directory, 0&
Select Case True
Case UserForm1.combobox2 = "A" And Sheet2.CheckBox273
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B72") & "\"
Case UserForm1.combobox2 = "B" And Sheet2.CheckBox274
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B72") & "\"
Case UserForm1.combobox2 = "C" And Sheet2.CheckBox275
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B72") & "\"
Case UserForm1.combobox2 = "D" And Sheet2.CheckBox276
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B72") & "\"
End Select
SHCreateDirectoryEx 0&, Directory, 0&
Select Case True
Case UserForm1.combobox2 = "A" And Sheet2.CheckBox277
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B73") & "\"
Case UserForm1.combobox2 = "B" And Sheet2.CheckBox278
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B73") & "\"
Case UserForm1.combobox2 = "C" And Sheet2.CheckBox279
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B73") & "\"
Case UserForm1.combobox2 = "D" And Sheet2.CheckBox280
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B73") & "\"
End Select
SHCreateDirectoryEx 0&, Directory, 0&
Select Case True
Case UserForm1.combobox2 = "A" And Sheet2.CheckBox281
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B74") & "\"
Case UserForm1.combobox2 = "B" And Sheet2.CheckBox282
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B74") & "\"
Case UserForm1.combobox2 = "C" And Sheet2.CheckBox283
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B74") & "\"
Case UserForm1.combobox2 = "D" And Sheet2.CheckBox284
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B74") & "\"
End Select
SHCreateDirectoryEx 0&, Directory, 0&
Select Case True
Case UserForm1.combobox2 = "A" And Sheet2.CheckBox285
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B75") & "\"
Case UserForm1.combobox2 = "B" And Sheet2.CheckBox286
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B75") & "\"
Case UserForm1.combobox2 = "C" And Sheet2.CheckBox287
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B75") & "\"
Case UserForm1.combobox2 = "D" And Sheet2.CheckBox288
Directory = New_Project & "\" & Sheet2.Range("A69") & "\" & Sheet2.Range("B75") & "\"
End Select
SHCreateDirectoryEx 0&, Directory, 0&
End Sub |
Partager