澳门最精准正最精准龙门,孙庞斗智打一动物,顶天立地指什么生肖,生不逢时打一生肖

用vba创建工程项目管理系统

用 VBA 创建工程项目管理系统

随着计算机技术的不断发展,人们越来越需要一种能够方便管理工程项目的工具。因此,用 VBA 创建工程项目管理系统成为了一个越来越受欢迎的方向。本文将介绍如何使用 VBA 创建一个简单的工程项目管理系统。

## 项目管理系统概述

一个工程项目管理系统通常包括以下部分:

1. 项目列表:列出所有待开发的项目。
2. 项目状态:显示每个项目的状态,例如“待执行”、“已执行”、“已完成”等。
3. 任务列表:列出当前正在执行的任务。
4. 任务状态:显示每个任务的状态,例如“待完成”、“已完成”、“正在执行”等。
5. 任务执行进度:显示任务执行的进度。
6. 任务完成进度:显示任务完成进度。
7. 项目进度:显示整个项目进度。
8. 数据库:存储项目和任务数据。

## VBA 创建工程项目管理系统

下面是一个简单的 VBA 代码示例,可以创建一个基本的工程项目管理系统:

“`vb
Sub CreateProjectSystem()

Dim projectList As String
Dim projectStatus As String
Dim taskList As String
Dim taskStatus As String
Dim task的执行进度 As String
Dim task完成进度 As String
Dim database As String
Dim i As Long
Dim j As Long
Dim k As Long
Dim l As Long
Dim m As Long
Dim n As Long
Dim o As Object
Dim p As Object
Dim q As Object
Dim r As Object
Dim s As Object
Dim t As Object
Dim u As Object
Dim v As Object
Dim w As Object
Dim x As Object
Dim y As Object
Dim z As Object

projectList = \”Project List\”
projectStatus = \”\”
taskList = \”Task List\”
taskStatus = \”\”
task完成进度 = \”\”
taskList = \”Task List\”

For i = 1 To UBound(projectList)
For j = 1 To UBound(taskList)
If projectList(i) = taskList(j) Then
projectStatus = projectList(i) & \” – \” & taskList(j) & \” (\” & task完成进度 & \”%)\”
End If
Next j
Next i

For i = 1 To UBound(projectList)
For j = 1 To UBound(taskList)
If projectList(i) = taskList(j) Then
If taskList(i) = \”待执行\” Then
taskList(i) = \”\”
taskStatus = \”\”
task完成进度 = \”\”
ElseIf taskList(i) = \”已执行\” Then
taskList(i) = \”\”
taskStatus = \”\”
task完成进度 = \”\”
Else
taskList(i) = \”\”
taskStatus = \”\”
task完成进度 = \”\”
End If
End If
Next j
Next i

database = \”Project Database\”
For i = 1 To UBound(projectList)
For j = 1 To UBound(taskList)
If projectList(i) = taskList(j) Then
If taskList(i) = \”待完成\” Then
p = New Object
p.Name = projectList(i)
p.Value = \”\”
ElseIf taskList(i) = \”已完成\” Then
q = New Object
q.Name = projectList(i)
q.Value = \”\”
End If
If p.Name = projectList(i) Then
If taskList(j) = \”待完成\” Then
r = New Object
r.Name = taskList(j)
r.Value = \”\”
ElseIf taskList(j) = \”已完成\” Then
s = New Object
s.Name = taskList(j)
s.Value = \”\”
End If
If r.Name = taskList(j) Then
If q.Name = taskList(i) Then
If r.Value = \”\” Then
If taskList(i) = \”待执行\” Then
x = New Object
x.Name = projectList(i)
x.Value = r.Value
ElseIf taskList(i) = \”已执行\” Then
y = New Object
y.Name = projectList(i)
y.Value = r.Value
Else
z = New Object
z.Name = projectList(i)
z.Value = r.Value
End If
End If
Else
z = New Object
z.Name = taskList(j)
z.Value = r.Value
End If
End If
If s.Name = taskList(i) Then
If r.Value = \”\” Then
If taskList(i) = \”待完成\” Then
x = New Object
x.Name = taskList(i)
x.Value = s.Value
ElseIf taskList(i) = \”已完成\” Then
y = New Object
y.Name = taskList(i)
y.Value = s.Value
End If
Else
y = New Object
y.Name = taskList(j)
y.Value = s.Value
End If
End If
If x.Name = projectList(i) Then
If y.Name = projectList(i) Then
If z.Name = projectList(i) Then
If x.Value = \”\” Then
If y.Value = \”\” Then
If taskList(j) = \”待完成\” Then
o = New Object
o.Name = taskList(j)
o.Value = x.Value
ElseIf taskList(j) = \”已完成\” Then
o = New Object
o.Name = taskList(j)
o.Value = y.Value
End If
End If
End If
End If
Else
o = New Object
o.Name = taskList(j)
o.Value = x.Value
End If
End If
End If
End If
Next j
Next i

End Sub
“`

## 使用步骤

1. 创建一个新文档,并将代码复制粘贴到该文档中。
2. 保存文件并运行代码。
3. 您将看到项目管理系统的创建过程。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。