Michael
Tue Jul 29 11:52:08 CDT 2003
Gary wrote:
> I have the following code in a Visual Basic 6 standard exe project. On
> my computer, the development computer, it works fine.
>
> Dim ObjH as variant
> Set objH = CreateObject ("Shell.Application")
>
> However, when the same line of code is executed on another computer,
> it gets a run time error "object variable or with block variable not
> set". This line of code is basically instantiating an object variable
> to point to an object application in the class named shell. Is there
> a Visual Basic reference or dll required to use this line? Does
> anyone know why this is occurring and what I can do to fix it. Thanks
> in advance.
On older OSes (Win95 and NT4) you need to have done an IE4 'Desktop Update'
to have active desktop capabilities (i.e., shell32.dll or later).
It *is* possible to do this after the fact with IE5 or later already
installed.
See these threads:
Google Search: IE4Shell group:microsoft.public.scripting.*
http://groups.google.com/groups?q=IE4Shell%20%20group:microsoft.public.scripting.*&num=100&scoring=d
--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
Technet Script Center
http://www.microsoft.com/technet/scriptcenter/default.asp
Microsoft® Windows®2000 Scripting Guide
http://www.microsoft.com/technet/scriptcenter/scrguide/sagsas_overview.asp