Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.office.developer.automation,microsoft.public.office.developer.com.add_ins
external usenet poster
 
Posts: 11
Default MsgBox repeated two times (Excel COM Add-in)

Dear Sirs,
in my Excel COM Add-in, written in VB6 SP6 (Office 2003) a routine show a
form (FormPwd) in order to permit users to enter a password.
When user enter password and press OK button, FormPwd appair again (without
any apparent reason).
There is an error in my code ?
TIA,
Maurizio Bellantone

Below code I extract form my add-in:

Sub Mask_Passwd()
' Call password request form
FormPwd.TextPwd.Text = ""
FormPwd.Show vbModal 'vbModal
End Sub
'
' FormPwd code
'
Private Sub ButPwdOk_Click()
Dim i As Integer, sB As String

pwd = TextPwd.Text
sB = GetProtectPwd()
msg$ = "Wrong Password!!!"
If pwd = sB Then
Call DisabilitaProtezione
Else
i% = MsgBox(msg$, vbExclamation)
End If
FormPwd.Hide
End Sub
Private Sub ButPwdEsc_Click()
FormPwd.Hide
End Sub
'
' DisabilitaProtezione enable/disable some excel sheets and Visible property
of some excel sheets
'

================================================== =======
BELLANTONE MAURIZIO - Teacher, IT Consultant, Programmer
SPINETTA MARENGO (AL) - ITALY
---------------------------------------------------------
E-mail: bellantoneCHIOCCIOLAlibero.it
================================================== =======


  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.office.developer.automation,microsoft.public.office.developer.com.add_ins
external usenet poster
 
Posts: 78
Default MsgBox repeated two times (Excel COM Add-in)

Hi, in my opinion, if the entered password matches the stored password you
call DisabilitaProtezione, but you have not hidden FormPwd. Hence, the
FormPwd will still be in the background when DisabilitaProtezione is
executing and after it has finished execution, it will once-again show the
FormPwd.

"Maurizio BELLANTONE" wrote:

Dear Sirs,
in my Excel COM Add-in, written in VB6 SP6 (Office 2003) a routine show a
form (FormPwd) in order to permit users to enter a password.
When user enter password and press OK button, FormPwd appair again (without
any apparent reason).
There is an error in my code ?
TIA,
Maurizio Bellantone

Below code I extract form my add-in:

Sub Mask_Passwd()
' Call password request form
FormPwd.TextPwd.Text = ""
FormPwd.Show vbModal 'vbModal
End Sub
'
' FormPwd code
'
Private Sub ButPwdOk_Click()
Dim i As Integer, sB As String

pwd = TextPwd.Text
sB = GetProtectPwd()
msg$ = "Wrong Password!!!"
If pwd = sB Then
Call DisabilitaProtezione
Else
i% = MsgBox(msg$, vbExclamation)
End If
FormPwd.Hide
End Sub
Private Sub ButPwdEsc_Click()
FormPwd.Hide
End Sub
'
' DisabilitaProtezione enable/disable some excel sheets and Visible property
of some excel sheets
'

================================================== =======
BELLANTONE MAURIZIO - Teacher, IT Consultant, Programmer
SPINETTA MARENGO (AL) - ITALY
---------------------------------------------------------
E-mail: bellantoneCHIOCCIOLAlibero.it
================================================== =======



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Return names which are repeated 5 times Gaurav[_4_] Excel Discussion (Misc queries) 2 December 18th 08 10:54 PM
Max no. of times a text repeated nsd Excel Discussion (Misc queries) 3 October 29th 08 05:40 PM
Count of times a number is repeated by date? bjkeyt Excel Worksheet Functions 2 April 7th 08 09:30 PM
Inserting Data Repeated Times Dan Spracklin Excel Discussion (Misc queries) 1 November 10th 06 05:51 PM
Count No. of times Dates are repeated Mandeep Dhami Excel Discussion (Misc queries) 6 December 8th 05 02:55 AM


All times are GMT +1. The time now is 02:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"