vb获取Word书签的内容!并将其显示在label控件中! 200
这是我自己做的模板,每个填有数字的地方都有一个书签,现在,我想获取小计这一列的内容,依次下来书签分别是“小计1、小计2、小计3等等”,在vb中代码怎么写才能获得这些个书签...
这是我自己做的模板,每个填有数字的地方都有一个书签,现在,我想获取小计这一列的内容,依次下来书签分别是“小计1、小计2、小计3等等”,在vb中代码怎么写才能获得这些个书签下的内容啊?就是把“119.6、119.6、3.5、5、39.375等等”赋值到label控件显示出来啊?
展开
2016-01-10 · 知道合伙人互联网行家
关注
展开全部
VB中使用Label控件,如下:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Label1.Text = "正在进行数据处理,请稍候..."
Dim bh1 As String
Dim xm1 As String
Dim zjls1, i, jb1, sj1, bj1, kg1, hx1, nf1, yf1, ts1 As Integer
Dim hxts1, kh1 As Double
Dim SQLString, Msg As String
SQLString = "SELECT bh As 编号,xm As 姓名,date8 As 日期 From kqsj WHERE month(date8) ='" & yf & "'"
Dim UserTable1 As DataTable = DBOperation.DBOperate(SQLString, Msg)
For i = 0 To UserTable1.Rows.Count
jb1 = jb1 + UserTable1.Rows(i).Item(4)
sj1 = sj1 + UserTable1.Rows(i).Item(5)
Next
Label1.Text = "数据处理完毕!"
End Sub
为什么运行时,Label1.Text 中只有一个空框,不显示 "正在进行数据处理,请稍候..."文字,而在程序运行快结束时Label1显示 "数据处理完毕!
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Label1.Text = "正在进行数据处理,请稍候..."
Dim bh1 As String
Dim xm1 As String
Dim zjls1, i, jb1, sj1, bj1, kg1, hx1, nf1, yf1, ts1 As Integer
Dim hxts1, kh1 As Double
Dim SQLString, Msg As String
SQLString = "SELECT bh As 编号,xm As 姓名,date8 As 日期 From kqsj WHERE month(date8) ='" & yf & "'"
Dim UserTable1 As DataTable = DBOperation.DBOperate(SQLString, Msg)
For i = 0 To UserTable1.Rows.Count
jb1 = jb1 + UserTable1.Rows(i).Item(4)
sj1 = sj1 + UserTable1.Rows(i).Item(5)
Next
Label1.Text = "数据处理完毕!"
End Sub
为什么运行时,Label1.Text 中只有一个空框,不显示 "正在进行数据处理,请稍候..."文字,而在程序运行快结束时Label1显示 "数据处理完毕!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |