通过Excel VBA应用MS Project settaskmode

发布于 2025-01-19 07:08:57 字数 412 浏览 2 评论 0原文

我正在阅读 Excel 中的工作表并创建任务、工作、注释等的 Microsoft Project 计划

。代码正在 MS Excel 中执行。

如何让 Active.Project 进行分配,SetTaskMode Manual:= False

我收到错误,请注意 Application.Visible = True

.Application.Methods (项目)而言,我可以调用 Application.About 屏幕,即在子执行时,MS Project About 屏幕打开,但是在那条线之后,它就停止了。

基本上,我想将活动工作表任务模式设置为“自动计划”,作为导入时所有任务的默认设置。

I am reading a sheet in Excel and creating a Microsoft Project Plan of tasks, Work, Notes, etc.

The code is being executed out of MS Excel.

How can I get the Active.Project to assign, SetTaskMode Manual:= False?

I receive an error, please note Application.Visible = True.

As far as .Application.Methods (Project) go, I am able to invoke the Application.About screen, i.e on Sub execution the MS Project About screen opens up, however after that line, it stops.

Basically, I would like to set the Active Sheet Task Mode to be set to 'automatically scheduled' as the default for all tasks as they are being imported.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

嘿哥们儿 2025-01-26 07:08:57

有问题的项目属性为这样用来使所有新任务自动安排了:

ActiveProject.NewTasksCreatedAsManual = False

或者,将任务模式设置为在单个任务上自动安排,请使用手册这样的属性:

tsk.Manual = False
    
' or to change to manually scheduled
tsk.Manual = True

The project property in question is NewTasksCreatedAsManual and is used like this to make all new tasks auto-scheduled:

ActiveProject.NewTasksCreatedAsManual = False

Alternatively, to set the task mode to auto-schedule on an individual task, use the Manual property like this:

tsk.Manual = False
    
' or to change to manually scheduled
tsk.Manual = True
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文