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.

Daten von Access nach Excel -> Problem mit der Exceltabell

Empfohlene Antworten

Hallo zusammen,

meine Aufgabenstellung war, Daten aus einer Access-Datenbank mir Hilfe eines VBA-Moduls in eine bestehende Excel-Tabelle zu schreiben. So weit, so gut. Hat geklappt.

Jetzt ist aber das Problem, dass wenn ich diese Excel-Tabelle einfach so öffnen möchte, Excel die Warnmeldung herausgibt, dass diese Tabelle bereits von mir geöffnet ist und ich sie nur schreibgeschützt öffnen kann. Dabei ist die Tabelle gar nicht geöffnet und die Access-Datenbank ist auch geschlossen.

Was mache ich falsch?

Das ist der Code:


Dim xlAnw As Excel.Application

Dim xlBuch As Excel.Workbook

Dim xlArbBlatt As Excel.Worksheet


Sub ExcelA()

  Set xlAnw = CreateObject("Excel.Application")

  Set xlBuch = xlAnw.Workbooks.Open("E:\TEST.xls")

  Set xlArbBlatt = xlBuch.Worksheets(2)


  SendKeys ("%j")   'benutze ich um die Speicherabfrage zu bejahen.

  xlAnw.Cells(21, 1) = "TEST"

  xlBuch.Save

  xlBuch.Close

  xlAnw.Quit

End Sub

Danke für die Hilfe.

JayN

Alles klar, sorry für die Störung. Das Problem ist gelöst, und zwar hatte ich durch vorhergehende Tests, bei denen das "Quit" noch nicht eingebaut war 8 Excel-Prozesse laufen. Also, öfter mal den Task-Manager aufrufen... ;)

JayN

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

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.