ewaldt at gdls.com 
      ewaldt at gdls.com
      
      Fri Jun 30 05:25:19 CDT 2006
    
I can't find anything wrong with this code, but Excel does not completely
close down (i.e., it shows up in Task Manager). Could someone tell me what
I'm missing, please? BTW, thanks to Duane Hookum for providing much of it;
I'm sure the error is in my part, not his.
TIA.
Thomas F. Ewald
FCS Database Manager
General Dynamics Land Systems
(586) 276-1256
-----------------------------------------------------------------------
Sub IPT_Export()
Dim objXLApp As Object
Dim objXLbook As Excel.Workbook
Dim astrLinks As Variant
Dim strFileName As String
strFileName = InputBox("What should the new file be named? ", "Request for
Information") & ".xls"
Set objXLApp = CreateObject("Excel.Application")
Set objXLApp = New Excel.Application
Set objXLbook = objXLApp.Workbooks.Open("WRI_IPT.xlt", 0)
DoCmd.SetWarnings False
objXLbook.SaveAs (strFileName)
astrLinks = ActiveWorkbook.LinkSources(Type:=xlLinkTypeExcelLinks)
ActiveWorkbook.BreakLink _
        Name:=astrLinks(1), _
        Type:=xlLinkTypeExcelLinks
objXLbook.Save
objXLbook.Close
Set objXLbook = Nothing
Set objXLApp = Nothing
DoCmd.SetWarnings True
End Sub
This is an e-mail from General Dynamics Land Systems. It is for the intended recipient only and may contain confidential and privileged information.  No one else may read, print, store, copy, forward or act in reliance on it or its attachments.  If you are not the intended recipient, please return this message to the sender and delete the message and any attachments from your computer. Your cooperation is appreciated.