05-09-2019
11:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
05-09-2019
11:30 AM
Hi! Why have two different Select statements? Can you condense this code to run with one Select statement? It appears that the second Select statement uses the Length variable just like the first one does.
Here is an example of condensing the two Select statements into one.
Select Length
Case "1" 'A-small_C-small
If (Me.Parameter(Me, "DIA1") < .250) & (Me.Parameter(Me, "DIA2") < .250) Then
iProperties.Value("Project", "Description") = "STUD, SHOULDERED, MALE, #" & ThreadTextA & " X " & ThreadLenA & """ L TO #" & ThreadTextC & " X " & ThreadLenC & """ L"
End If
Messagebox.Show("1: Small,Small")
Case "2" 'A-small_C-big
'... etc.
End Select
And just a quick thing about Select statements. Hope this helps!
Select length ' Here length is the variable you want to check
Case 1 ' Read this line as, "When length = 1 do this"
MessageBox.Show("Length is 1!")
Case 2 ' You can also read this as, "If length = 2, then do this"
MessageBox.Show("Length is 2!")
End Select