Als Antwort auf diesen Beitrag
Moin Dieter, :-)
... einen
Verweis auf die
Excelbibliothek gesetzt, sonst würde er "
xlup" auch anmeckern. Du
musst aber auch berücksichtigen, dass bei
With alle Zugehörigen mit Punkt versehen werden müssen: ;-)
Option Explicit
Public Sub Main()
Dim lngLastRow As Long
Dim xlMappe As Object
Dim xlBlatt As Object
Dim xlApp As Object
Set xlMappe = GetObject("C:\Temp\Arbeitsdokument.xlsx")
Set xlBlatt = xlMappe.Sheets("Tabelle1")
With xlBlatt
lngLastRow = .Cells(.Rows.Count, 2).End(xlUp).Row + 1
If lngLastRow < 17 Then lngLastRow = 17
.Cells(lngLastRow, 2).Value = "NurEinTest"
End With
With xlMappe
.Windows(1).Visible = True
.Save
.Parent.Quit
End With
Set xlBlatt = Nothing
Set xlMappe = Nothing
End Sub
Der
Punkt vor
Rows ist
wichtig. ;-)
Servus
Case