G
Gary Schneider
Hello world,
I am writing directly into an existing Excel file with Outlook VBA,
using the following subroutine (example only). The routine terminates
correctly. When I reopen the file manually, Excel displays it hidden!
But why? There is no code to hide it in my subroutine...
Can anyone help?
'--------------------------------------
Sub test()
Dim xlApp As Excel.Application
Dim wb As Excel.Workbook
Dim ws As Excel.Worksheet
Set xlApp = New Excel.Application
Set wb = GetObject("C:\Temp\t1.xls")
Set ws = wb.Worksheets("myWorksheet")
ws.Cells(2, 1).Formula = "TEST"
wb.Close Savechanges:=True
xlApp.Quit
Set ws = Nothing
Set wb = Nothing
Set xlApp = Nothing
End Sub
'--------------------------------------
I am writing directly into an existing Excel file with Outlook VBA,
using the following subroutine (example only). The routine terminates
correctly. When I reopen the file manually, Excel displays it hidden!
But why? There is no code to hide it in my subroutine...
Can anyone help?
'--------------------------------------
Sub test()
Dim xlApp As Excel.Application
Dim wb As Excel.Workbook
Dim ws As Excel.Worksheet
Set xlApp = New Excel.Application
Set wb = GetObject("C:\Temp\t1.xls")
Set ws = wb.Worksheets("myWorksheet")
ws.Cells(2, 1).Formula = "TEST"
wb.Close Savechanges:=True
xlApp.Quit
Set ws = Nothing
Set wb = Nothing
Set xlApp = Nothing
End Sub
'--------------------------------------