請參考
'coded by ***@2005.11.04
'Purpose: TreeView簡單示例
'Requirement: Microsoft Windows Common Controls X.x(MSCOMCTL.ocx)
' ctv OLE Control module(dmocx.dll)
'Module: Userform with a TreeView control
Option Explicit
Private Sub UserForm_Initialize()
Dim nodX As Node
Dim myHwnd As Long
With Me.TreeView1
With .Nodes
.Add , , "L1", "Root"
.Add "L1", tvwChild, "L11", "1"
.Add "L1", tvwChild, "L12", "2"
.Add "L11", tvwChild, "L111", "3"
.Add "L12", tvwChild, "L121", "4"
.Add "L12", tvwChild, "L122", "5"
.Item("L122").EnsureVisible
.Item("L111").EnsureVisible
End With
.Style = tvwTreelinesPlusMinusText
End With
End Sub
--
http://crdotlin.vgocities.net/plog/
"Hyper" 來函:
Post by Hyper我想知道如何用 Excel 作出樹狀表
例如
A有 1,2,3, 項, 選了1, 1又可以帶出4,5.6,選了5,...
請問可以嗎?