View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
[email protected] honey16d@gmail.com is offline
external usenet poster
 
Posts: 4
Default Runtime Error 1004

On Apr 13, 1:51 pm, wrote:
On Apr 13, 12:35 pm, wrote:

hi!!


i keep getting this error in vb!!!


worksheetCount = objExcel.Worksheets.Count=== this is my code...


the error i get is Run Time error 1004--- Application Defined Error
or Object Error


Can somebody plz help me out in tis???


this is how i hav defined it!!

Dim objExcel As Object
Set objExcel = CreateObject("Excel.Application")
worksheetCount = objExcel.Worksheets.Count




hey Hi!!

I have declared an excel path from the vb script!!

excelPath = "C:\ExcelFiles\Dimension XML Generation.xls"

Wen i run the macro from the excel sheet i get this error!!

Request you to kindly let me know if there is another way of defining
it