Mit Access Excel bearbeiten

  • Access

Es gibt 1 Antwort in diesem Thema. Der letzte Beitrag () ist von petaod.

    Mit Access Excel bearbeiten

    Hallo Miteinander,

    Ich habe ein kleines Problem, ich öffne zurzeit mit:

    Visual Basic-Quellcode

    1. Dim xlApp As Object ' Excel.Application
    2. Dim xlBook As Object 'Excel.Workbook
    3. Dim xlSheet As Object 'Excel.Worksheet
    4. Dim objcell As Object
    5. On Error Resume Next
    6. Set xlApp = GetObject(, "Excel.Application")
    7. If xlApp Is Nothing Then
    8. Set xlApp = CreateObject("Excel.Application")
    9. End If
    10. On Error GoTo 0
    11. xlApp.Visible = True ' Testphase
    12. Set xlBook = xlApp.Workbooks.Open("C:\Users\" & Environ("Username") & "\Desktop\adressen.xls")
    13. Set xlSheet = xlBook.Worksheets(1)
    14. With xlSheet
    15. ' hier beliebige Excelfunktionen einbauen
    16. End With
    17. xlBook.Save ' Testphase
    18. xlApp.Application.Quit ' Testphase
    19. Set xlApp = Nothing
    20. Set xlBook = Nothing

    ein Excel fiel aus Acces heraus, nun würde ich gerne in dem Excel file via makro in der ACCESS DB die ersten 5 zeilen löschen.


    kann mir da jemand helfen?