IfCheckForActivate =FalseAndAlsoNotResStr = ID.ActivateCodeThenShowActivateDialog:WithActivateDialog.KeyCode = ID.KeyCode.ActivateCodeValue = ID.ActivateCodeIf.ShowDialog() = Windows.Forms.DialogResult.OKThenIf.ActivateCode = ID.ActivateCodeThenIO.File.WriteAllText(ActivateDocument, ID.UnlockString(.ActivateCode))MsgBox("Activate Document Created Successfully.", MsgBoxStyle.Information)EndIfEndIfEndWithEndIf