Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15537

VS 2017 Else If variable argument question...

$
0
0
Hello:

I would like to pass a string variable into my ElseIf argument.

This works!
Code:

ElseIf StateName <> "Released" And StateName <> "Standard Part" And StateName <> "Under Engineering Editing Pre Release" Then
This does not:
Code:

If chkPrintInEngineering.Checked = False Then
    arg = "StateName <> '" & "Released" & "' And StateName <> '" & "Standard Part" & "' Then "

End If

If chkPrintInEngineering.Checked = True Then
    arg = "StateName <> '" & "Released" & "' And StateName <> '" & "Standard Part" & "' And StateName <> '" & "Under Engineering Editing Pre Release" & "' Then "

End If

ElseIf arg Then

Is there a way to accomplish this??

Thanks!

Viewing all articles
Browse latest Browse all 15537

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>