msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Automation error -2147417848 on windows 98 while using excel

 
Post new topic   Reply to topic    msvisual.com Forum Index -> OLE
Author Message
Sudhanshu Jain



Joined: 04 Oct 2007
Posts: 1

PostPosted: Fri Oct 01, 2004 5:26 pm    Post subject: Automation error -2147417848 on windows 98 while using excel Reply with quote

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.

Archived from group: microsoft>public>vb>ole>automation
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msvisual.com Forum Index -> OLE All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group