office交流網(wǎng)--QQ交流群號及微信交流群

Access培訓(xùn)群:792054000         Excel免費(fèi)交流群群:686050929          Outlook交流群:221378704    

Word交流群:218156588             PPT交流群:324131555

微信交流群(請用微信掃碼)

        

test vba

2017-07-01 22:17:00
zstmtony
原創(chuàng)
3101
摘要:VBA 測試代碼 未測試完全
Private Sub Form_Load()
 
 If fraType.Value = 1 Then
  
    '增加一個(gè)設(shè)置是否可多選的項(xiàng),節(jié)點(diǎn)checked=true
    mintType = 0
    mstrId = 1
    mstrSql = "SELECT * FROM met_column where lang='cn' ORDER BY bigclass,[name] " 'gf_Nz(gf_GetParaItem("Sql", Me.OpenArgs))
    mstrParentFld = "bigclass"
    mstrIdFld = "id"
    mstrTitleFld = "name"
    mstrCheckBox = 1
    'Me.trvType.SingleSel = True
    LoadTree
    If mstrId <> "" And mstrId <> "0" And mintType = 1 Then
        On Error Resume Next '當(dāng)相關(guān)項(xiàng)與 當(dāng)前類別 是父子關(guān)系時(shí),會提示出錯(cuò) 以后再改進(jìn)
        Me.trvType.Nodes.Remove mstrId
    Else
      If mstrCheckBox <> "1" Then GotoNode "fo_" & mstrId
    End If
Else
    '增加一個(gè)設(shè)置是否可多選的項(xiàng),節(jié)點(diǎn)checked=true
    mintType = 0
    mstrId = 1
    mstrSql = "SELECT * FROM eps_category ORDER BY parent,[order] "
    mstrParentFld = "parent"
    mstrIdFld = "id"
    mstrTitleFld = "name"
    mstrCheckBox = 1
    'Me.trvType.SingleSel = True
    LoadTree
    If mstrId <> "" And mstrId <> "0" And mintType = 1 Then
        On Error Resume Next '當(dāng)相關(guān)項(xiàng)與 當(dāng)前類別 是父子關(guān)系時(shí),會提示出錯(cuò) 以后再改進(jìn)
        Me.trvType.Nodes.Remove mstrId
    Else
      If mstrCheckBox <> "1" Then GotoNode "fo_" & mstrId
    End If
End If
 
    Me.trvType.FullRowSelect = True
'    Me.trvType.HideSelection = False
'    Me.trvType.HotTracking = True
     Me.trvType.LabelEdit = 0
       wbMessage.Navigate "about:blank"

End Sub
分享
文章分類
聯(lián)系我們
聯(lián)系人: 王先生
Email: 18449932@qq.com
QQ: 18449932
微博: officecn01
移動訪問