16-Bit VB 4.0 and MS Project Objects 
Author Message
 16-Bit VB 4.0 and MS Project Objects

I am having a two problems with using Early Binding on MS Project
objects in the 16-bit version of VB 4.0 (Enterprise).  When declaring
the application as type "Object" everything works fine.  

Ex:
  Dim oMSP As Object
  ...
  Set oMSP = CreateObject("MSProject.Application")

After adding a reference to the MSP type library (shipped with MS
Project 4.0) and using the correct type, however, I get a "Cannot
Create OLE object" error that ONLY appears under Windows95.  If I run
the app under Windows 3.1, the code below works fine.

Ex:
  Dim oMSP As MSProject.Application
  ...
  Set oMSP = CreateObject("MSProject.Application")   '' <- Error

The above is a minor annoyance, however.  The real problem is that I
can't declare objects as type "Project".  I want to do this to improve
performance, since Early Binding is reputed to greatly reduce overhead
and enhance speed (and because the system I'm building handles mutiple
projects which are each over 1Mb in size).
I have tried this, and everything works fine except for the UniqueID
method (not the property).  When oProject is declared as type
"Object", the following works fine:

  Set RAList = oProject.Tasks.UniqueID(UID).Assignments

Where UID is the Unique task ID of some task, and RAList is an Object
of type "Assignments".

When I dim oProject as type "MSProject.Project", however, I get a
compile-time error telling me that "UniqueID" is not a valid method.

Is there a bug in the type library somewhere?  If so, does anyone know
if Microsoft has an updated file for Project 4.0?  I have checked
Microsoft.com and come up empty.

Any responses would be greatly appreciated.  Please cc me at

articles in such an active group.

Thanks,
          -----------------------------
         | Erik L. Przekop             |
         | Damon, Przekop & Associates |
         | Dearborn Heights, MI        |

         | http://www.*-*-*.com/ ~erik     |
          -----------------------------



Mon, 02 Nov 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. VB 4.0 (16-Bit)/Crystal Reports 3.0.1.32 (16-Bit) Print Preview Maximize Window

2. 16 bit API calls in VB 3 supported in 32 bit VB 4.0

3. VB 4.0 16-bit Bug with OLE (Was Re: VB 4.0 Enterprise and OLE)

4. VB 4.0 16 bit or 32 bit Escape Key

5. VB 4.0 conversion from 32 bit to 16 bit

6. VB 4.0: 16 bit vs 32 bit

7. VB 4.0 (16 bit vs 32 bit)

8. CARDS.DLL 16 Bit doesn't work on VB 4.0 32 Bit

9. CARDS.DLL 16 Bit doesn't work on VB 4.0 32 Bit

10. CARDS.DLL 16 Bit doesn't work on VB 4.0 32 Bit

11. Shell and Wait 16 bit apps from 32 bit VB 4.0

12. CARDS.DLL 16 Bit doesn't work on VB 4.0 32 Bit

 

 
Powered by phpBB® Forum Software