继续潜水

导航

 

Option Explicit

Dim mdl ' the current model
Set mdl = ActiveModel
Dim Tab 'running table
Dim col_1
Dim col_2
Dim col_3
Dim col_4

' 定义属性变量
for each Tab in ActiveModel.Tables

Set col_1 = Tab.Columns.CreateNew
Set col_2 = Tab.Columns.CreateNew
Set col_3 = Tab.Columns.CreateNew
Set col_4 = Tab.Columns.CreateNew

'添加公共字段 by Sinu

col_1.name = "创建人"
col_1.code = "CJR"
col_1.DataType = "varchar(50)"
col_1.comment= "创建人"

col_2.name = "创建时间"
col_2.code = "CJSJ"
col_2.DataType = "datetime"
col_2.comment= "创建时间"

col_3.name = "修改人"
col_3.code = "XGR"
col_3.DataType = "varchar(50)"
col_3.comment= "修改人"

col_4.name = "修改时间"
col_4.code = "XGSJ"
col_4.DataType = "datetime"
col_4.comment= "修改时间"

next
MsgBox "success"

posted on 2019-03-15 11:46  继续潜水  阅读(2933)  评论(0编辑  收藏  举报