Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > VBA / Office Integration > Word, PowerPoint, Outlook, and Other Office Products > Method ~ of Object ~ Failed


Reply
 
Thread Tools Display Modes
  #1  
Old 01-16-2004, 07:40 AM
Brian149 Brian149 is offline
Newcomer
 
Join Date: Aug 2003
Posts: 4
Default Method ~ of Object ~ Failed


Ok, Here is a question for all of you VB Experts:

I am using VB 6.0 SP5. I have a DLL written in VB that generates an Excel spreadsheet using automation. In this case, it is a spreadsheet for a Parts Requisition. When I create a new parts requisition and generate the spreadsheet, there is no problem. When I exit the dialog box and edit the same requsition and try to generate it again, then I get the above error.

This problem only happens when I run the front end application in the VB IDE. It does NOT happen if I run the DLL in a separate VB session to try to debug it. It also does not happen if I compile the front end into an executable and run the executable. It only occurs if the front end is being ran in a single VB session.

Since it does not occur in the Exe, that makes it not so important, but I would still like to know why it is happening and what fix there is for it.
Thanks.
Reply With Quote
  #2  
Old 01-17-2004, 03:25 AM
mark007's Avatar
mark007 mark007 is offline
Licensed to post

* Expert *
 
Join Date: Jul 2003
Location: York, Uk
Posts: 1,637
Default

What line of code is giving this error:

Method ~ of Object ~ Failed

?
Reply With Quote
  #3  
Old 01-17-2004, 07:16 AM
Flyguy's Avatar
Flyguy Flyguy is offline
Lost Soul

Super Moderator
* Guru *
 
Join Date: May 2001
Location: Vorlon
Posts: 18,887
Default

Reply With Quote
  #4  
Old 01-19-2004, 07:38 AM
Brian149 Brian149 is offline
Newcomer
 
Join Date: Aug 2003
Posts: 4
Default Still a Problem

Hello:

The problem that I mentioned has not been resolved. Here is some additional information:

The problem does not occur when I run the DLL in a second instance of VB, thus I cannot tell what line of the program the problem occurs in. It only occurs when I run the application (the front end) in a single instance of VB.

I have upgraded to Visual Studio 6.0 SP5, and the problem still occurs.

Unlike the other users who complained about a similiar issue, I am not running two instances of VB when the problem happens. In fact, if I run two instances of VB (the front end in one, and the back end DLL in another), the problem does not occur.

I am not using any templates in the Excel spreadsheet. I am just creating a new workbook and writing directly to the cells of the spreadsheet.

So, can anyone tell me why this is happening??
Reply With Quote
  #5  
Old 01-19-2004, 08:03 AM
dincer80 dincer80 is offline
Freshman
 
Join Date: Jul 2003
Posts: 46
Default

I think MDAC installation is necessary...

Quote:
Originally Posted by Brian149
Ok, Here is a question for all of you VB Experts:

I am using VB 6.0 SP5. I have a DLL written in VB that generates an Excel spreadsheet using automation. In this case, it is a spreadsheet for a Parts Requisition. When I create a new parts requisition and generate the spreadsheet, there is no problem. When I exit the dialog box and edit the same requsition and try to generate it again, then I get the above error.

This problem only happens when I run the front end application in the VB IDE. It does NOT happen if I run the DLL in a separate VB session to try to debug it. It also does not happen if I compile the front end into an executable and run the executable. It only occurs if the front end is being ran in a single VB session.

Since it does not occur in the Exe, that makes it not so important, but I would still like to know why it is happening and what fix there is for it.
Thanks.

Reply With Quote
  #6  
Old 01-19-2004, 07:40 PM
Brian149 Brian149 is offline
Newcomer
 
Join Date: Aug 2003
Posts: 4
Default

I already reinstalled MDAC 2.6 RTM from the Microsoft web-site. I have used their component checker application and my files now match exactly with MDAC 2.6 RTM. It did not help.

Quote:
Originally Posted by dincer80
I think MDAC installation is necessary...

Quote:
Originally Posted by Brian149
Ok, Here is a question for all of you VB Experts:

I am using VB 6.0 SP5. I have a DLL written in VB that generates an Excel spreadsheet using automation. In this case, it is a spreadsheet for a Parts Requisition. When I create a new parts requisition and generate the spreadsheet, there is no problem. When I exit the dialog box and edit the same requsition and try to generate it again, then I get the above error.

This problem only happens when I run the front end application in the VB IDE. It does NOT happen if I run the DLL in a separate VB session to try to debug it. It also does not happen if I compile the front end into an executable and run the executable. It only occurs if the front end is being ran in a single VB session.

Since it does not occur in the Exe, that makes it not so important, but I would still like to know why it is happening and what fix there is for it.
Thanks.


Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Method 'Open of object recordset' failed dgdolins1 Database and Reporting 2 02-29-2004 04:20 AM
Method 'Open' of object '_Recordset' failed danny-t Database and Reporting 2 12-19-2003 07:41 AM
Method 'Range' of object '_Worksheet' failed msmeth Excel 9 11-14-2003 01:08 AM
Method 'cells' of object '_global' failed QuantumCat Word, PowerPoint, Outlook, and Other Office Products 10 09-30-2003 12:52 AM
Method 'Charts' of Object '_Global' failed sureshbabu Excel 1 08-14-2003 04:41 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->