frmmain.close
Set frmMain = nothing
The above you don't need!!