When 'xls.visible = true' code is used, the excel window can only be seen in the task bar minimized. The rest of the code execute normally without error. Tried a couple API tricks to get excel to show up with no luck. Been automating excel for report a long time with the piece of code bellow with success with Access 2002. Now using Access 2003. Hoping someone saw this before...
Private Sub cmd_GoExcel_Click()
Call MakeReport
End Sub
Private Sub MakeReport()
Dim xls As Excel.Application
Set xls = CreateObject("Excel.Application")
With xls
.Workbooks.Add
.Visible = True
.Range(.Cells(1, 2), .Cells(1, 8)).Select
With .Selection
.MergeCells = True
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.Font.Name = "Arial"
.Font.Size = 14
.Font.Bold = True
End With
.ActiveCell.Value = "2011-2012 DGSSPE"
End With
End Sub