akashawalker
New Member
- Joined
- May 2, 2013
- Messages
- 16
Hi to all
I have a code where a cell has a value it should point for a path and if have another value it should point to another path.
what i can see is that the code i have it doesn't work.
I can only see one path showing when the number is 3, but when is 4 nothing happens.
Thansk for your time and collaboration.
Sofia Grave
I have a code where a cell has a value it should point for a path and if have another value it should point to another path.
what i can see is that the code i have it doesn't work.
Code:
########## Flow curve folder path Pressure 'Get the model so we can select the flow curve folder for ECO and VOC
On Error GoTo errormessage1:
Dim modelcode1 As String, FCP_1 As String, FCV_1 As String, FCGF_1 As String
Dim modelcode2 As String, FCP_2 As String, FCV_2 As String, FCGF_2 As String
Dim modelcode3 As String, FCP_3 As String, FCV_3 As String, FCGF_3 As String
'Dim FCP_1 As String, FCV_1 As String, FCGF_1 As String
'Dim FCP_2 As String, FCV_2 As String, FCGF_2 As String
'Dim FCP_3 As String, FCV_3 As String, FCGF_3 As String
Dim Pflowcurve1 As String, Pflowcurve2 As String, Pflowcurve3 As String
Dim Vflowcurve1 As String, Vflowcurve2 As String, Vflowcurve3 As String
Dim GFflowcurve1 As String, GFflowcurve2 As String, GFflowcurve3 As String
modelcode1 = Left(Worksheets("wizard setup").Range("p16").Value, 1)
' Worksheets("Approval Drawing 1").Range("B37").Value = modelcode1
'
modelcode2 = Left(Worksheets("wizard setup").Range("s16").Value, 1)
' Worksheets("Approval Drawing 2").Range("B37").Value = modelcode2
'
modelcode3 = Left(Worksheets("wizard setup").Range("v16").Value, 1)
' Worksheets("Approval Drawing 3").Range("B37").Value = modelcode3
'
'
If modelcode1 = 3 Then
myDirFlow1 = "S:\Sales E Files\E-files\3. Valves\Flowkurver\1112 - PV-ECO"
Else: modelcode1 = 4
myDirFlow1 = "S:\Sales E Files\E-files\3. Valves\Flowkurver\1113 - PV-VOC"
End If
If modelcode2 = 3 Then
myDirFlow2 = "S:\Sales E Files\E-files\3. Valves\Flowkurver\1112 - PV-ECO"
Else: modelcode2 = 4
myDirFlow2 = "S:\Sales E Files\E-files\3. Valves\Flowkurver\1113 - PV-VOC"
End If
If modelcode3 = 3 Then
myDirFlow3 = "S:\Sales E Files\E-files\3. Valves\Flowkurver\1112 - PV-ECO"
Else: modelcode3 = 4
myDirFlow3 = "S:\Sales E Files\E-files\3. Valves\Flowkurver\1113 - PV-VOC"
End If
If modelcode1 = 4 Then
myDirFlow1 = "S:\Sales E Files\E-files\3. Valves\Flowkurver\1112 - PV-ECO"
Else: modelcode1 = 3
myDirFlow1 = "S:\Sales E Files\E-files\3. Valves\Flowkurver\1113 - PV-VOC"
End If
If modelcode2 = 3 Then
myDirFlow2 = "S:\Sales E Files\E-files\3. Valves\Flowkurver\1112 - PV-ECO"
Else: modelcode2 = 4
myDirFlow2 = "S:\Sales E Files\E-files\3. Valves\Flowkurver\1113 - PV-VOC"
End If
If modelcode3 = 3 Then
myDirFlow3 = "S:\Sales E Files\E-files\3. Valves\Flowkurver\1112 - PV-ECO"
Else: modelcode3 = 4
myDirFlow3 = "S:\Sales E Files\E-files\3. Valves\Flowkurver\1113 - PV-VOC"
End If
' If Worksheets("Approval Drawing 1").Range("b37") = 4 Then
' myDirFlow1 = "S:\Sales E Files\E-files\3. Valves\Flowkurver\1113 - PV-ECO"
'' Else
'' myDirFlow1 = "S:\Sales E Files\E-files\3. Valves\Flowkurver\1112 - PV-VOC"
' End If
I can only see one path showing when the number is 3, but when is 4 nothing happens.
Thansk for your time and collaboration.
Sofia Grave
Last edited by a moderator: