Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default excel 2002 runtime error 1004

Hi, I have a problem with this code, when open a file excel show an
error runtime 1004 on add method, Why ?

Thanks for help


private sub aprifile()
Set EExcel = CreateObject("Excel.Application")
Set EWorkbook = EExcel.Workbooks

'Apre File Excel Template
Call EWorkbook.Add("p:\pubblica\procedure\modulistica\r ilevazione
personale.xlt")

EExcel.Visible = True
end sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default excel 2002 runtime error 1004

Sounds like XL can't find your template file. Are you sure the path and
filename are correct?

In article , xenod
wrote:

Hi, I have a problem with this code, when open a file excel show an
error runtime 1004 on add method, Why ?

Thanks for help


private sub aprifile()
Set EExcel = CreateObject("Excel.Application")
Set EWorkbook = EExcel.Workbooks

'Apre File Excel Template
Call EWorkbook.Add("p:\pubblica\procedure\modulistica\r ilevazione
personale.xlt")

EExcel.Visible = True
end sub

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default excel 2002 runtime error 1004

xenod
How about:

private sub aprifile()
Set EExcel = CreateObject("Excel.Application")

'Apre File Excel Template
Set EWorkbook
=EExcel.Workbooks.Add("p:\pubblica\procedure\modul istica\rilevazione
personale.xlt")

EExcel.Visible = True
end sub

NickHK



"xenod" wrote in message
...
Hi, I have a problem with this code, when open a file excel show an
error runtime 1004 on add method, Why ?

Thanks for help


private sub aprifile()
Set EExcel = CreateObject("Excel.Application")
Set EWorkbook = EExcel.Workbooks

'Apre File Excel Template
Call EWorkbook.Add("p:\pubblica\procedure\modulistica\r ilevazione
personale.xlt")

EExcel.Visible = True
end sub



Reply
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
excel chart export error runtime 1004 Mau Charts and Charting in Excel 3 August 17th 05 11:35 AM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
Runtime error 1004 edreczk Excel Programming 1 November 4th 04 10:19 PM
Excel 2002 Data Forms runtime error 1004 Charles Osborne Excel Programming 6 May 2nd 04 03:46 AM
runtime error 1004 when opening excel file via VBA in a browser Ken Hunter Excel Programming 2 July 31st 03 03:33 PM


All times are GMT +1. The time now is 09:10 PM.

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

About Us

"It's about Microsoft Excel"