This is the code I use to hide a userform whether it is done by hitting the "Close" button or the "X" at the top right. For some reason when I use the close button then re-open the form it will still show all the typed data that was on the form before closing if I had not submitted it. This does not happen when I hit the X however, when I re-open the form it is once again blank. Anyone know why or where the fault is in my code?
Private Sub cmdClose2_Click()
AddInfo.Hide
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode <> 1 Then
AddInfo.Hide
End If
End Sub
Bookmarks