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.

[VBA] Makro an Checkbox (war: VBA Problem)

Empfohlene Antworten

Veröffentlicht

Tag,

schreibe gerade ein Makro das ihr unten sehn könnt. Dieses soll einfach nur, nach dem klicken auf eine Checkbox einen Text in eine Textmarke einfügen.... Das klappt nur bedingt. Also wenn ich das Makro direckt ausführe funktioniert es. Wenn ich jedoch auf die besagte checkbox klicke passiert nichts.... warum?

Hier mein Code:

Code:


Sub WriteInBookmark(ByVal sBookmarkName As String, _

                    ByVal sBookmarkText As String)

    'Schreibt einen neuen Wert in ein vorhandenes Bookmark

    If ActiveDocument.Bookmarks.Exists(sBookmarkName) Then

        Dim r As Range

        Set r = ActiveDocument.Bookmarks(sBookmarkName).Range

        r.Text = sBookmarkText

        ActiveDocument.Bookmarks.Add sBookmarkName, r

    End If

End Sub


Sub Summe()

With ActiveDocument


 If ActiveDocument.Bookmarks.Exists("Kontrollkästchen1") = True Then

        ActiveDocument.Bookmarks("Kostenmon").Range.Text = "Neuer Text"


 Else

        MsgBox ("Textmarke Kontrollkästchen1 nicht vorhanden")



End If

Bitte helft mir^^

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.