View Single Post
  #2   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
Debra Dalgleish Debra Dalgleish is offline
external usenet poster
 
Posts: 2,979
Default excel with project embeded in it

Something like:

Dim x As Worksheet
Dim y As Object
Dim c As Integer
Set x = ThisWorkbook.ActiveSheet
Set y = x.OLEObjects(1)
y.Verb
c = ActiveProject.Tasks.Count
Debug.Print c


greg wrote:
Hello,
I have Excel with project embeded in it. (insert objectms project
document)
from excel vba i would like to talk to project.
so i am trying this

Dim x As Excel.Worksheet
Set x = ThisWorkbook.ActiveSheet
Set y = x.OLEObjects(1)
c = y.Tasks.Count

i would think that y is project. but it does not seem like it.

can anyone help?

thanks




--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html