Sub
DonClemente()
Dim
xlApp
As
Object
Dim
xlWkb
As
Object
Dim
sFile
As
String
sFile =
"C:\Test\Test.xlsx"
With
CreateObject(class:=
"Scripting.FileSystemObject"
)
If
.fileexists(sFile)
Then
Set
xlApp = CreateObject(class:=
"Excel.Application"
)
Set
xlWkb = xlApp.Workbooks.Open(sFile)
With
xlWkb.Worksheets(1)
.Range(
"A1"
).Value =
"Zelle A1 via Range"
.Cells(1, 2).Value =
"Zelle A2 via Cells"
End
With
xlApp.DisplayAlerts =
False
xlWkb.Close SaveChanges:=
True
xlApp.DisplayAlerts =
True
xlApp.Quit
Else
End
If
End
With
Set
xlWkb =
Nothing
Set
xlApp =
Nothing
End
Sub