MsgBox prompt to include TextBox4 value?

Big Lar

Well-known Member
Joined
May 19, 2002
Messages
557
Code:
If Trim(Me.TextBox4.Value) >= 7 Then<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
If MsgBox(Prompt:="Is #1 score correct?", Buttons:=vbYesNo) = vbNo Then<o:p></o:p>
Me.TextBox4.SetFocus<o:p></o:p>
Exit Sub<o:p></o:p>
Else<o:p></o:p>
End If<o:p></o:p>
End If
<o:p></o:p>
Is it possible for the MsgBox prompt to include TextBox4 value?
<o:p></o:p>
Example:
<o:p></o:p>
If TextBox4.Value equals 10,
<o:p></o:p>
MsgBox prompt equals “Is 10 correct for #1?”
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Try

Code:
If MsgBox(Prompt:="Is " & TextBox4.Value & " correct for #1?", Buttons:=vbYesNo + vbQuestion) = vbNo Then
 
Upvote 0
I belive this is what you are looking for

Code:
If Trim(Me.TextBox4.Value) >= 7 Then
If MsgBox(Prompt:="Is " & Trim(Me.TextBox4.Value) & " correct for #1?", Buttons:=vbYesNo) = vbNo Then
Me.TextBox4.SetFocus
Exit Sub
Else
End If
End If
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,351
Members
452,907
Latest member
Roland Deschain

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