Remove conditions

juneau730

Board Regular
Joined
Jun 7, 2018
Messages
111
Okay, I am having a total brain fart and should be able to figure this out.. This is part of the code for one function in my massive dBase. As you see it's a Yes, No, Cancel call. I want it to default to NO all the time and go right to the IF statement, without it popping up the Yes, No, Cancel message box

Code:
strIntroMessage = "Click 'Yes' to query " & Replace(strTargetOU," ","")strIntroMessage = strIntroMessage & vbCrLf & vbCrLf & "Click 'No' to select a different OU to query"


strChoice = MsgBox(strIntroMessage,vbYesNoCancel,"Select Target Container")
' Yes=6 No=7 Cancel=2


If strChoice = 7 Then
	GetTargetLocation
ElseIf strChoice = 2 Then
	WScript.Echo vbTab & "*** Action has been cancelled. Quitting..." & vbCrLf
	WScript.Quit
End If
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,214,976
Messages
6,122,543
Members
449,089
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top