ainaedil
04-06-2012, 06:17 AM
I need to understand the code below.
please help.
Private Sub submit_Click()
Dim LicensedTo As String, RegistrationKey As String, Email As String
LicensedTo = Trim(Me.editLicensedTo.Text)
RegistrationKey = TrimAll(Me.editRegistrationKey.Text)
Email = TrimAll(Me.editEmail.Text)
If (GetEvaluationDaysLeftNum() <= 0 And IsEvaluationResetPassword(RegistrationKey)) Then
If DoMsgBox("Do you wish to extend your evaluation period?", vbQuestion + vbYesNo) = vbYes Then
ExtendEvaluationPeriod
Me.Hide
End If
ElseIf (DoMsgBox(QUEST_LICENSED_TO_1 & LicensedTo & QUEST_LICENSED_TO_2, vbQuestion + vbYesNo) = vbNo) Then
TextBoxSetFocusAndSelectContents Me.editLicensedTo
Else
Dim szErrMsg As String
SetWaitCursor True
If RegistrationKey <> GetLicenceHashPreReg(Email) Then
SetWaitCursor False
DoMsgBoxWithSalesLinks ERR_REGISTRATION_KEY_OR_EMAIL_ADDRESS_INCORRECT
TextBoxSetFocusAndSelectContents Me.editEmail
ElseIf Not CanUseLicenceHash(szLicensedTo, Email, RegistrationKey, ErrMsg) Then
SetWaitCursor False
DoMsgBox ErrMsg
TextBoxSetFocusAndSelectContents Me.editRegistrationKey
Else
SetWaitCursor False
Me.Hide
End If
End If
End Sub
please help.
Private Sub submit_Click()
Dim LicensedTo As String, RegistrationKey As String, Email As String
LicensedTo = Trim(Me.editLicensedTo.Text)
RegistrationKey = TrimAll(Me.editRegistrationKey.Text)
Email = TrimAll(Me.editEmail.Text)
If (GetEvaluationDaysLeftNum() <= 0 And IsEvaluationResetPassword(RegistrationKey)) Then
If DoMsgBox("Do you wish to extend your evaluation period?", vbQuestion + vbYesNo) = vbYes Then
ExtendEvaluationPeriod
Me.Hide
End If
ElseIf (DoMsgBox(QUEST_LICENSED_TO_1 & LicensedTo & QUEST_LICENSED_TO_2, vbQuestion + vbYesNo) = vbNo) Then
TextBoxSetFocusAndSelectContents Me.editLicensedTo
Else
Dim szErrMsg As String
SetWaitCursor True
If RegistrationKey <> GetLicenceHashPreReg(Email) Then
SetWaitCursor False
DoMsgBoxWithSalesLinks ERR_REGISTRATION_KEY_OR_EMAIL_ADDRESS_INCORRECT
TextBoxSetFocusAndSelectContents Me.editEmail
ElseIf Not CanUseLicenceHash(szLicensedTo, Email, RegistrationKey, ErrMsg) Then
SetWaitCursor False
DoMsgBox ErrMsg
TextBoxSetFocusAndSelectContents Me.editRegistrationKey
Else
SetWaitCursor False
Me.Hide
End If
End If
End Sub