Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Objekt auf "aktiv" prüfen

Empfohlene Antworten

Veröffentlicht

Hallo,

ich erstelle mit ein Objekt:

Dim xxx as Object

Set xxx as CreateObject("xxxxxxxxx.yyyyyyyyy")

...

...

..

..

Natürlich wird dies per

xxx.CallMethod

aufgerufen.

Wie kann ich nun testen ob dieses Objekt noch aktiv ist oder vom User schon geschlossen worden ist. Es wäre schön von Euch wenn ihr mir mehrere Lösungsansätze geben könnt.

Danke und falls man nichts mehr voneinander hört:

Guten Rutsch!!!!

Frohes neues Jahr.


Option Explicit

Dim fsoTest As FileSystemObject


Private Sub btnAktiv_Click()

    Set fsoTest = New FileSystemObject

    If do_strange_things(fsoTest) Then

        MsgBox "Objekt da"

    Else

        MsgBox "Objekt nicht da"

    End If

    Set fsoTest = Nothing

End Sub


Private Sub btnInaktiv_Click()

    If do_strange_things(fsoTest) Then

        MsgBox "Objekt da"

    Else

        MsgBox "Objekt nicht da"

    End If

End Sub


Private Function do_strange_things(fsoTest As FileSystemObject) As Boolean

Dim lngFehler As Long

    On Error Resume Next

        Call fsoTest.FileExists("c:\autoexec.bat")

        lngFehler = Err.Number

    On Error GoTo 0

    If lngFehler = 91 Then

        do_strange_things = False

    Else

        do_strange_things = True

    End If

End Function

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.