Urgent: run-time error "458" 
Author Message
 Urgent: run-time error "458"

I' have installed an application with Excel automation (VB6, office 2000).
Because my PC has
office 97,  I uninstall that application.

Now, in all my old  programs with excel automation (VB6, office 97,
reference:Microsoft Excel 8.0 Object Library), in the instruction:
                            Dim rel As Excel.Application
                            Set rel = CreateObject("Excel.Application")
I get that error:
                        Run-time error "458"
                        Variable uses an Automation Type not supported in
Visual Basic

Can anyone please help me?
Thank you
Paulo Pra?a



Wed, 18 Jun 1902 08:00:00 GMT  
 Urgent: run-time error "458"
You may want to read this article from the Knowledgebase.

http://support.microsoft.com/support/kb/articles/Q170/1/64.asp
INFO: VB 6.0 Readme Part 1: Important Issues -   Read First!

"You can test for the existence of the
  components by trapping for run-time error 458 - "Variable uses
an
  Automation type not supported in Visual Basic". If this error
occurs, the
  DCOM or Service Pack components must be updated; "

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



Wed, 18 Jun 1902 08:00:00 GMT  
 Urgent: run-time error "458"
Now I change this line of code:

Dim rel As object '(not Excel.Application)
Set rel = CreateObject("Excel.Application")

and now work!!!!
I doesn't understand way!!!!

Thanks
Paulo Pra?a

Quote:

>You may want to read this article from the Knowledgebase.

>http://support.microsoft.com/support/kb/articles/Q170/1/64.asp
>INFO: VB 6.0 Readme Part 1: Important Issues -   Read First!

>"You can test for the existence of the
>  components by trapping for run-time error 458 - "Variable uses
>an
>  Automation type not supported in Visual Basic". If this error
>occurs, the
>  DCOM or Service Pack components must be updated; "

>* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network
*
>The fastest and easiest way to search and participate in Usenet - Free!



Wed, 18 Jun 1902 08:00:00 GMT  
 Urgent: run-time error "458"
The reason you see the error in the former and not the latter has to do
with the notion of "binding," or at what time your application reads
and interprets the type library associated with the related objects it
supports.

When you explicitly declare a variable to be of a particular object
type, i.e. Dim Foo as New MagicObject, that's an example of *early*
binding. The application you build already knows about the type library
for the specified object when the project is compiled.

If you go through the CreateObject route, binding does not occur until
the object is created with the CreateObject function - at run time.
This means that type library information is not read until the object
is *created*. This is known as "late binding."

Hope this helps!

David Whitney


Quote:

> Now I change this line of code:

> Dim rel As object '(not Excel.Application)
> Set rel = CreateObject("Excel.Application")

> and now work!!!!
> I doesn't understand way!!!!

> Thanks
> Paulo Pra?a


034.remarq.com>...
> >You may want to read this article from the Knowledgebase.

> >http://support.microsoft.com/support/kb/articles/Q170/1/64.asp
> >INFO: VB 6.0 Readme Part 1: Important Issues - Read First!

> >"You can test for the existence of the
> > components by trapping for run-time error 458 - "Variable uses
> >an
> > Automation type not supported in Visual Basic". If this error
> >occurs, the
> > DCOM or Service Pack components must be updated; "

> >* Sent from RemarQ http://www.remarq.com The Internet's Discussion
Network
> *
> >The fastest and easiest way to search and participate in Usenet -
Free!

Sent via Deja.com http://www.deja.com/
Before you buy.


Wed, 18 Jun 1902 08:00:00 GMT  
 Urgent: run-time error "458"


Quote:
>Now I change this line of code:

>Dim rel As object '(not Excel.Application)
>Set rel = CreateObject("Excel.Application")

>and now work!!!!
>I doesn't understand way!!!!

This may be the answer:
http://support.microsoft.com/support/kb/articles/Q244/2/24.asp

Peter Arnold



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Printing Error "Run Time error 486"

2. DCOM ERROR Run-time error "91"

3. Run-time error 458

4. Getting a run-time error 458, why?

5. run-time error 458

6. run time error 458

7. Run-time error '458'

8. run time error 458

9. Run-time error '458'

10. Run-time Error '458'

11. run time error "52": bad file name or number

12. HELP "Run-time error 432" HELP

 

 
Powered by phpBB® Forum Software