Also, a msgbox only returns the key pressed not a type-in answer. Use inputbox instead for a type-in answer.
MsgBox returns a string (as craig said) and MYVAR needs to be dim'd as a string.
Also, a msgbox only returns the key pressed not a type-in answer. Use inputbox instead for a type-in answer.
MsgBox returns a string (as craig said) and MYVAR needs to be dim'd as a string.