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 unerwünschtes globales schliessen

Empfohlene Antworten

hi, ich und meine vba probs wieder ;)

ich habe ein worddokument, genauer gesagt eine .dot (vorlage)

in dieser vorlage habe ich einen eigenen schliessen-dialog geschrieben:

------------------------------

Sub FileClose()

If ActiveDocument.Saved = False Then

If MsgBox("Möchten Sie das dokument vor dem Schließen speichern?", vbYesNo + vbQuestion) = vbYes Then

Call FileSave

ActiveDocument.Close

Else

ActiveDocument.Close (0)

End If

Else

ActiveDocument.Close (0)

End If

End Sub

------------------------------

nun ist das ganz grosse problem dass wenn ich dieses dokument öffne und danach ein ganz normales leeres neues dokument in word parallel öffne sich der schliessen dialog auch auf das neue, leere dokument auswirkt!

genauso ist es mit meinem eigenen speicherdialog.

wie kann ich das verhindern??

ich möchte natürlich nebenher evtl. auch noch andere dokumente ohne makro in word erstellen und bearbeiten und da muss eben der windows eigene speichern und schliessen dialog greifen.

*hoff*

schreibst Du das Makro evtl. in der normal.dot statt Deiner Vorlage?

Prüfe mal im projektexplorer in welcher Vorlage das Makro steht!

nee nee in der normal dot is leider nix drin.

habs nun anders gelöst (ist aber nicht besonders elegant)

ich habe in meiner dot dem dokument ein "customproperty" mitgegeben. das besitzen dann nur die dokumente die mit dieser dot erzeugt wurden.

beim speichern wird dann überprüft ob das property vorhanden ist (dann eigener speicherdialog) wenn nicht dann normal windows.

wäre aber für jegliche andere lösung noch offen..

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.