Re: Click-Ereignis unterdrücken

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hallo Peter,

Am Tue, 31 May 2005 14:07:42 +0200 schrieb Peter Götz:

> Hallo Ahmed:
>
>> In einem öffentlichen Modul wird eine Checkbox
>> frmFiBu.cmdStorno.Value = 0
>> gesetzt.
>>
>> Jetzt wird aber immer das Click-Ereignis ausgeführt. Dieses möchte ich
>> aber unterdrücken. Wie geht das?
>
> Kleines Beispiel:
> 1 Form: Form1
> mit 1 CheckBox: Check1
>
> ' /// Code in Form1
> Option Explicit
>
> Private mInhibitFlag As Boolean
>
> Private Sub Check1_Click()
> If Not mInhibitFlag Then
> MsgBox Check1.Name & " wurde angeklickt!", vbInformation
> End If
> End Sub
>
> Private Sub Form_Click()
> Dim Checked As Integer
> Checked = (Check1.Value = vbChecked)
> Checked = Not Checked
>
> mInhibitFlag = True
> Check1.Value = Abs(Checked)
> mInhibitFlag = False
> End Sub
>
> ' \\\ E N T E
>
> Nach dem Programmstart mehrmals auf die Form (nicht Checkbox) klicken.
> Und dann mal auf die Checkbox klicken.
>
> Alles klar?

Ja. Ich dachte man kann sich eine Variable sparen und es geht einfach
sowas wie DoEvents = False o. ähnlich.

Ich mache es jetzt so: frmFibu.cmdStorno.Tag = 1
Und diese Tag-Eigenschaft verwende ich zur Überprüfung.

Danke nochmals an alle. :-)

Gruß Ahmed
--
Antworten bitte nur in der Newsgroup.
.



Relevant Pages

  • Re: Change Box Color on CheckBox Control
    ... you don't need the checkbox functionality ... for those mirrored checkboxes, do you? ... Private Sub Check1_Click ...
    (microsoft.public.vb.general.discussion)
  • Re: Checkbox-Weite automatisch setzen
    ... Public Sub SetProperCheckBoxWidth ... (ByVal uCheckBox As CheckBox) ... Private WithEvents CheckBox1 As CheckBox ... Private mCounter As Integer ...
    (microsoft.public.de.vb)
  • RE: Calling a sub on another worksheet
    ... Try the following with double quotes and also note full name of sub ... I am trying to use a checkbox to show or hide an additional worksheet. ... part is easy - but what I am also trying to do is call a subroutine (Private ... Dim RemSection As Long ...
    (microsoft.public.excel.programming)
  • Re: Using Checkbox Values
    ... While it's true the even code is designated Private by default, ... I have created a checkbox on Sheet1, then the following sub (in ... Module1) produces different output dependent on whether the checkbox ... When I create a checkbox (using the control toolbox), ...
    (microsoft.public.excel.programming)
  • Re: CheckBox unchecked status detection in DataGrid Template Column
    ... private CustomCheckBoxHeader headerCheckBox; ... CustomCheckBoxHeader(headerCheckBoxTooltip): new CustomCheckBoxHeader; ... private abstract class CustomCheckBox: CheckBox, ... (itemsArray, headerArray) ...
    (microsoft.public.dotnet.framework.aspnet)