LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Workbooks.add([Template]) Crashing Excel


I write custom reports for my company using excel to pull data out o
access databases. Anyway, the issue I am having is at one of ou
customers it will no longer run the report. After some debugging I hav
found the following error..

Automation Error Remote Procedure Call Failed: #-2147023170

Anyway, it crashes when opening a new session of excel through th
macro
Here is the portion of the code that pertains to the crashing...

Sub OpenTemplate(File_Path as string)
Dim xlApp as excel.application
Dim xlDoc as workbook

set xlApp = CreateObjecT("Excel.Application")
*set xlDoc = xlApp.Workbooks.Add(File_Path)*
This is where it is error out. It runs just fine on my machine and al
of our other customers machines....

They are running Excel 2002; and Microsoft Windows XP.

Does anyone have a clue about why this would fail? The File_Path is th
correct file and I can open it manually. I even did an immediates windo
with just

*Workbooks.Add("c:\backoff\doc1.xls")*

That crashed Excel completely..

--
kralj
-----------------------------------------------------------------------
kraljb's Profile: http://www.excelforum.com/member.php...nfo&userid=995
View this thread: http://www.excelforum.com/showthread.php?threadid=40094

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a template option for Workbooks.Add(xlWBATWorksheet)? Hank Scorpio Excel Discussion (Misc queries) 6 August 11th 09 09:37 AM
I want a Master Worksheet that other Workbooks use as a template? coreyb66 Excel Discussion (Misc queries) 3 April 14th 08 12:33 AM
Is there a way to set up a template for new workbooks? Richard Excel Discussion (Misc queries) 6 May 26th 06 04:08 PM
Template changes to existing workbooks farmkid21 Excel Worksheet Functions 2 March 23rd 06 06:51 PM
macro problems with Workbooks.Add Template Philip[_6_] Excel Programming 2 June 23rd 04 05:17 PM


All times are GMT +1. The time now is 03:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"