Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the help.
got it now Dim x As Worksheet Dim y As Object Dim c As Integer Set x = ThisWorkbook.ActiveSheet Set y = x.OLEObjects(1) y.Verb c = y.Object.Tasks.Count MsgBox "tasks - " + Str(c) "Debra Dalgleish" wrote in message ... Yes, it works for me in Excel 2003. You should have a reference set to MS Project -- in the VBE, choose ToolsReferences, and add a check mark to Microsoft Project 11.0 Object Library greg wrote: Hello, Thank you for your response. I get an "object required", when using this code: c = ActiveProject.Tasks.Count so I added this: c = y.ActiveProject.Tasks.Count and get this: "object doesn't support this property or method" I am using office 2003. does yours work? thanks "Debra Dalgleish" wrote in message ... 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 -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Embeded picture in Excel | Excel Worksheet Functions | |||
Parent of the embeded excel | Excel Discussion (Misc queries) | |||
Embeded Excel File gridlines? | Excel Discussion (Misc queries) | |||
Displaying Linked and Embeded Objects in Excel | Excel Discussion (Misc queries) | |||
VB OLE embeded excel document cannot be saved -err 1004 | Excel Programming |