Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automation error -2147417848 on windows 98 while using excel in VB ( works fine in XP)

When I am using Excel automation in VB6 to change some values in excel
files, it works fine on Windows XP machine. I used Excel 8.0 object
Library.

but I tested this Exe on windows 98 it started giving me Automation
Error -2147417848 . After debugging I found exact place where error is
coming.

Follwing is the code used in this application

Dim xl As Excel.Application
Dim wb As Excel.Workbook
Dim ws As Excel.Worksheet
Dim rg As Excel.Range
Set xl = CreateObject("Excel.Application")
Set wb = xl.Workbooks.Open(destination, False, False, , OpenPwd,
ModifyPwd)
Set ws = wb.Worksheets(1)
Set rg = ws.UsedRange.Find("<<")
While Not rg Is Nothing
temp = ws.Cells(rg.Row, rg.Column).Formula
ws.Cells(rg.Row, rg.Column).Formula = PutData(temp, rs)
ws.Cells(rg.Row, rg.Column).Formula = ws.Cells(rg.Row, rg.Column)
Set rg = ws.UsedRange.FindNext(rg)
Wend


It gives error on following line

Set rg = ws.UsedRange.Find("<<")


Please some one tell, if this can be solved on windows 98.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automation error -2147417848 on windows 98 while using excel in VB

Hi Sudhanshu,

I got the same issue as you do, at least that is my understanding. If this
is the same error as I had, then here what you can do. Instead of using
xl.Workbooks.Open, try to use xl.Workbooks.Add. This works for me that is
this should fix the Automation problem for Windows 98.

Jack Wang

"Sudhanshu Jain" wrote:

When I am using Excel automation in VB6 to change some values in excel
files, it works fine on Windows XP machine. I used Excel 8.0 object
Library.

but I tested this Exe on windows 98 it started giving me Automation
Error -2147417848 . After debugging I found exact place where error is
coming.

Follwing is the code used in this application

Dim xl As Excel.Application
Dim wb As Excel.Workbook
Dim ws As Excel.Worksheet
Dim rg As Excel.Range
Set xl = CreateObject("Excel.Application")
Set wb = xl.Workbooks.Open(destination, False, False, , OpenPwd,
ModifyPwd)
Set ws = wb.Worksheets(1)
Set rg = ws.UsedRange.Find("<<")
While Not rg Is Nothing
temp = ws.Cells(rg.Row, rg.Column).Formula
ws.Cells(rg.Row, rg.Column).Formula = PutData(temp, rs)
ws.Cells(rg.Row, rg.Column).Formula = ws.Cells(rg.Row, rg.Column)
Set rg = ws.UsedRange.FindNext(rg)
Wend


It gives error on following line

Set rg = ws.UsedRange.Find("<<")


Please some one tell, if this can be solved on windows 98.

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
Automation error '-2147417848 (80010108)' excel 2007 Lilandra Excel Discussion (Misc queries) 0 July 9th 09 11:16 PM
Error arising in Windows XP having Excel 2002, was fine in WindowsNT having Excel2000 Sha Excel Programming 4 June 3rd 04 08:57 PM
Automation error -2147417848 (80010108) mbobro[_5_] Excel Programming 2 April 8th 04 01:10 PM
Automation Error with Excel 97 in Windows 2000 with patch blaster Gustavo Berrutti Excel Programming 0 October 8th 03 03:52 PM
RPC ERROR - 1ST TIMES WORKS FINE - 2ND TIME ERRORS OUT PoK Excel Programming 0 August 5th 03 08:51 PM


All times are GMT +1. The time now is 05:30 AM.

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"