换一种思路
Select Case e.Path
Case "test.htm", ""
Dim wb As New WeUI
With wb.AddTable("","Table1")
.CreateFromDataTable(DataTables("表A"))
End With
With wb.AddButtonGroup("", "btg1", False)
With .Add("btnFirst", "首页", "button")
If 1=1 Then
.Attribute = ""
.Kind = 1
.Enabled = False
Else
.Attribute = "onclick = ""location='http://www.baidu.com'"""
.Kind = 1
.Enabled = True
End If
End With
End With
e.WriteString(wb.Build)
End Select