Hello,
In Access I have the follow VBA-code:
sub test()
Dim ex as New Excel.Application
ex.DisplayAlerts =False
ex.Workbooks.Open "c:\test.xls
ex.Range("A1").value= "Example"
ex.ActiveWorkbook.Save
ex.Quit
ex.DisplayAlerts = True
Set ex = Nothing
End Sub
If Excel is get starting and the workbook test.xls is not open
this code workt perfect.
But if test.xls is open this code do not work, the value of
cel A1 is empty.
I want to allways write the value to Cel A1 if test.xls is
open or not opened.
Can somebody helpme?
Greetings,
mulderm
In Access I have the follow VBA-code:
sub test()
Dim ex as New Excel.Application
ex.DisplayAlerts =False
ex.Workbooks.Open "c:\test.xls
ex.Range("A1").value= "Example"
ex.ActiveWorkbook.Save
ex.Quit
ex.DisplayAlerts = True
Set ex = Nothing
End Sub
If Excel is get starting and the workbook test.xls is not open
this code workt perfect.
But if test.xls is open this code do not work, the value of
cel A1 is empty.
I want to allways write the value to Cel A1 if test.xls is
open or not opened.
Can somebody helpme?
Greetings,
mulderm