Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default communication with MS Project

Hi,

I have an application in Excel which communicates with MS
Project. The syntax might be correct (no error message),
but it is not executed. I cannot imagine why and I find no
hint in the object catalogue.
My code:

Dim Projekt As Object
' start Project
Set Projekt = CreateObject("MSProject.Project")
Projekt.Application.FileOpen newTimeSchedule

'*****this is the part which is not executed
If Check_TP_A.Value = False Then 'CheckBox
Projekt.Application.SelectTaskField Row:=0,
Column:="Name"
Projekt.Application.SetTaskField Field:="%
Abgeschlossen", Value:="100", AllSelectedTasks:=True
End If
'*****
Projekt.Application.FileClose pjSave
'Close MSProject
Projekt.Application.Quit pjDoNotSave

Thanks for every hint!

Anne


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default communication with MS Project

If a block of code protected by an IF statement is not executed, the obvious
cause is that the condition specified in the If statement is not passed. I
would begin debugging by figuring out what the value of Check_TP_A is
before you hit the IF statement and make sure it is being defined correctly
and so forth.

--
Regards,
Tom Ogilvy


"Anne" wrote in message
...
Hi,

I have an application in Excel which communicates with MS
Project. The syntax might be correct (no error message),
but it is not executed. I cannot imagine why and I find no
hint in the object catalogue.
My code:

Dim Projekt As Object
' start Project
Set Projekt = CreateObject("MSProject.Project")
Projekt.Application.FileOpen newTimeSchedule

'*****this is the part which is not executed
If Check_TP_A.Value = False Then 'CheckBox
Projekt.Application.SelectTaskField Row:=0,
Column:="Name"
Projekt.Application.SetTaskField Field:="%
Abgeschlossen", Value:="100", AllSelectedTasks:=True
End If
'*****
Projekt.Application.FileClose pjSave
'Close MSProject
Projekt.Application.Quit pjDoNotSave

Thanks for every hint!

Anne




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
RS-232 Serial Communication dcstech[_2_] Excel Programming 0 June 22nd 04 04:40 PM
communication daniel Excel Programming 2 April 16th 04 12:01 PM
communication Daniel[_8_] Excel Programming 0 April 2nd 04 09:46 AM
communication Rob van Gelder[_4_] Excel Programming 1 April 1st 04 01:06 PM
Add-In communication with outside Application Matthew Wieder Excel Programming 3 February 9th 04 06:46 AM


All times are GMT +1. The time now is 10:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"