以下是引用davida在2005-6-23 9:21:15的发言:
守老大又不理俺了。
抱歉,我实在太忙,谢谢步兵兄理解与支持.
代码如下:
'* +++++++++++++++++++++++++++++
'* Created By I Love You_Word!@ExcelHome 2005-6-25 6:31:22
'仅测试于System: Windows NT Word: 10.0 Language: 2052
'^The Code CopyIn [ThisDocument-ThisDocument]^'
'* -----------------------------
Private Sub OptionButton1_Click()
ComboBox1.Enabled = True
ComboBox2.Enabled = False
ComboBox2.Text = ""
Additem1
End Sub
'----------------------
Private Sub OptionButton2_Click()
ComboBox1.Enabled = False
ComboBox1.Text = ""
ComboBox2.Enabled = False
ComboBox2.Text = ""
End Sub
'----------------------
Private Sub OptionButton3_Click()
ComboBox1.Enabled = False
ComboBox1.Text = ""
ComboBox2.Enabled = False
ComboBox2.Text = ""
End Sub
'----------------------
Private Sub OptionButton4_Click()
ComboBox2.Enabled = True
ComboBox1.Enabled = False
ComboBox1.Text = ""
AddItem2
End Sub
'----------------------
Private Sub AddItem2()
Application.ScreenUpdating = False
ComboBox2.Clear
ComboBox2.AddItem "大连尊荣"
ComboBox2.AddItem "北京路华"
ComboBox2.AddItem "中汽南方"
Application.ScreenUpdating = True
End Sub
'----------------------
Private Sub Additem1()
Application.ScreenUpdating = False
ComboBox2.Clear
ComboBox1.AddItem "直销"
ComboBox1.AddItem "杭州"
ComboBox1.AddItem "宁波"
ComboBox1.AddItem "金华"
ComboBox1.AddItem "苏州"
ComboBox1.AddItem "常州"
ComboBox1.AddItem "郑州"
ComboBox1.AddItem "无锡"
ComboBox1.AddItem "温州"
ComboBox1.AddItem "台州"
ComboBox1.AddItem "绍兴"
ComboBox1.AddItem "南京"
ComboBox1.AddItem "合肥"
Application.ScreenUpdating = True
End Sub
'----------------------
'简单地说两句,这个东东,不用ACTIVEX控件,使用USERFORM更方便.
你的ACTIVEX的有一个引用,在我这儿没有,丢失,我看了一下,与文档无关,我移除了.
在使用FRAM控件时,在文档中设计,要比在USERFORM中设计,难一些,稍不留神,WORD便 BYEBYE了,所以,我也耗一些时间(半个小时)
GhtVQndO.rar
(20.24 KB, 下载次数: 32)
|