I am looking for a way to have a msgbox that if you press yes it does something. and if you press no it does something else. i read somewhere that there is like a number for each button that determines the response. but i cant find it. if you could give me a list of the numbers and a sample code for me to screw around with. and if you could do this with an inputbox that would help. i need it to say something like confirmed if they hit ok and say something like not confirmed if they hit cancel and dont type anything
You need to specify the msgbox as a variable. So, for example: Code: Dim response response = MsgBox("Choose yes or no!",vbYesNo) If response = vbYes Then MsgBox("You clicked yes!") Else MsgBox("You clicked no!") EndIf Have a look here for a more detailed explaination.