跪求大神帮忙做一道VB题!!!!!!!!!!!!!!!急需!!!! 200
如图,三天内,麻烦把VB代码发过来,能有原文件最好没有题目,这就是原题,做什么样的都可以,用VB语言...
如图,三天内,麻烦把VB代码发过来,能有原文件最好
没有题目,这就是原题,做什么样的都可以,用VB语言 展开
没有题目,这就是原题,做什么样的都可以,用VB语言 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励10(财富值+成长值)+提问者悬赏200(财富值+成长值)
12个回答
展开全部
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
--
2022-12-05 广告
2022-12-05 广告
图形化编程简单理解为用积木块形式编程,scratch和python也是其中的一种,属于入门级编程,以其简单生动的画面获得无数学生的喜爱,深圳市创客火科技有限公司是一家做教育无人机的公司,旗下有编程无人机,积木无人机及室内外编队,每款飞机含有...
点击进入详情页
本回答由--提供
展开全部
Private Sub CommandButton2_Click()
'STATISTICS Accoding to custom code
Dim objData As Object
Dim strSQL As String
Dim blnStatus As Boolean
Dim intStatus As Integer
Dim lngCount As Long
Dim strBegin, strEnd As String
Dim qufen As String
Dim strCode As String
Dim row As Long
Dim row2 As Long
Dim col As Long
Dim col1, col2, col3, col4, col5, col6, col7, col8 As Single
col1 = 1
col2 = 2
col3 = 3
col4 = 4
col5 = 5
col6 = 6
col7 = 7
col8 = 8
qufen = "00" '伝票区分=标准発放=制品
strCode = ""
strBegin = dateBegin.Text
strEnd = dateEnd.Text
If strBegin = "" Or strEnd = "" Then
MsgBox ("Please input the begin and end date,then try again!")
Exit Sub
End If
intStatus = MsgBox("Ater clear the data of cell,then get the data from ORACLE database." & vbCrLf & vbCrLf & "Is it OK?", vbYesNo + vbDefaultButton2)
If intStatus <> vbYes Then
Exit Sub
End If
On Error GoTo Button1_Click_Error
With Sheets("Statistics")
row = 3
'Clear the data of statistics display
Do While .Cells(row, col1).Value <> ""
.Cells(row, col1).Value = "" 'custom code
.Cells(row, col2).Value = "" 'custom name
.Cells(row, col3).Value = "" 'amount
row = row + 1
Loop
strSQL = ""
strSQL = "SELECT"
strSQL = strSQL & " TRIM(I_CUSTOMER_CD) AS CUSTOMER_CD," & vbCrLf 'custom code
strSQL = strSQL & " SUM(I_AMT) AS AMT" & vbCrLf 'amount
strSQL = strSQL & " FROM T_SHIP_TR" & vbCrLf
strSQL = strSQL & " WHERE" & vbCrLf
strSQL = strSQL & " TO_CHAR(I_SHIP_DATE,'YYYYMMDD') >= '" & strBegin & "'" & vbCrLf 'start date
strSQL = strSQL & " AND TO_CHAR(I_SHIP_DATE,'YYYYMMDD') <= '" & strEnd & "'" & vbCrLf 'end date
strSQL = strSQL & " AND TRIM(I_SHIP_CLS) = '" & qufen & "'" & vbCrLf 'made products
strSQL = strSQL & " GROUP BY I_CUSTOMER_CD" & vbCrLf
strSQL = strSQL & " ORDER BY I_CUSTOMER_CD"
blnStatus = COM_CreateDynaset(strSQL, objData)
If Not blnStatus Then
Exit Sub
End If
If objData.RecordCount = 0 Then 'miss find data from database
MsgBox ("Could not find the data in the database!")
Exit Sub
End If
row = 3
Do While Not objData.EOF
strCode = Trim(COM_GetFieldString(objData.Fields("CUSTOMER_CD").Value))
.Cells(row, col1).Value = strCode 'export custom code to excel
With Sheets("codeAndName")
row2 = 1
Do While .Cells(row2, col1).Value <> ""
If strCode = .Cells(row2, col1).Value Then
Sheets("Statistics").Cells(row, col2).Value = .Cells(row2, col2).Value 'export custom name to excel
Exit Do
End If
row2 = row2 + 1
Loop
End With
.Cells(row, col3).Value = Trim(COM_GetFieldString(objData.Fields("AMT").Value)) 'export amount to excel
row = row + 1
objData.MoveNext
Loop
End With
'close database
objData.Close
Set objData = Nothing
'Sheets("Statistics").Select
'Range("A2").Select
'Success message
MsgBox ("Success to stastic the data of record!")
Exit Sub
Button1_Click_Error:
MsgBox ("Error happened," & vbCrLf & "Please make sure!")
End Sub
'STATISTICS Accoding to custom code
Dim objData As Object
Dim strSQL As String
Dim blnStatus As Boolean
Dim intStatus As Integer
Dim lngCount As Long
Dim strBegin, strEnd As String
Dim qufen As String
Dim strCode As String
Dim row As Long
Dim row2 As Long
Dim col As Long
Dim col1, col2, col3, col4, col5, col6, col7, col8 As Single
col1 = 1
col2 = 2
col3 = 3
col4 = 4
col5 = 5
col6 = 6
col7 = 7
col8 = 8
qufen = "00" '伝票区分=标准発放=制品
strCode = ""
strBegin = dateBegin.Text
strEnd = dateEnd.Text
If strBegin = "" Or strEnd = "" Then
MsgBox ("Please input the begin and end date,then try again!")
Exit Sub
End If
intStatus = MsgBox("Ater clear the data of cell,then get the data from ORACLE database." & vbCrLf & vbCrLf & "Is it OK?", vbYesNo + vbDefaultButton2)
If intStatus <> vbYes Then
Exit Sub
End If
On Error GoTo Button1_Click_Error
With Sheets("Statistics")
row = 3
'Clear the data of statistics display
Do While .Cells(row, col1).Value <> ""
.Cells(row, col1).Value = "" 'custom code
.Cells(row, col2).Value = "" 'custom name
.Cells(row, col3).Value = "" 'amount
row = row + 1
Loop
strSQL = ""
strSQL = "SELECT"
strSQL = strSQL & " TRIM(I_CUSTOMER_CD) AS CUSTOMER_CD," & vbCrLf 'custom code
strSQL = strSQL & " SUM(I_AMT) AS AMT" & vbCrLf 'amount
strSQL = strSQL & " FROM T_SHIP_TR" & vbCrLf
strSQL = strSQL & " WHERE" & vbCrLf
strSQL = strSQL & " TO_CHAR(I_SHIP_DATE,'YYYYMMDD') >= '" & strBegin & "'" & vbCrLf 'start date
strSQL = strSQL & " AND TO_CHAR(I_SHIP_DATE,'YYYYMMDD') <= '" & strEnd & "'" & vbCrLf 'end date
strSQL = strSQL & " AND TRIM(I_SHIP_CLS) = '" & qufen & "'" & vbCrLf 'made products
strSQL = strSQL & " GROUP BY I_CUSTOMER_CD" & vbCrLf
strSQL = strSQL & " ORDER BY I_CUSTOMER_CD"
blnStatus = COM_CreateDynaset(strSQL, objData)
If Not blnStatus Then
Exit Sub
End If
If objData.RecordCount = 0 Then 'miss find data from database
MsgBox ("Could not find the data in the database!")
Exit Sub
End If
row = 3
Do While Not objData.EOF
strCode = Trim(COM_GetFieldString(objData.Fields("CUSTOMER_CD").Value))
.Cells(row, col1).Value = strCode 'export custom code to excel
With Sheets("codeAndName")
row2 = 1
Do While .Cells(row2, col1).Value <> ""
If strCode = .Cells(row2, col1).Value Then
Sheets("Statistics").Cells(row, col2).Value = .Cells(row2, col2).Value 'export custom name to excel
Exit Do
End If
row2 = row2 + 1
Loop
End With
.Cells(row, col3).Value = Trim(COM_GetFieldString(objData.Fields("AMT").Value)) 'export amount to excel
row = row + 1
objData.MoveNext
Loop
End With
'close database
objData.Close
Set objData = Nothing
'Sheets("Statistics").Select
'Range("A2").Select
'Success message
MsgBox ("Success to stastic the data of record!")
Exit Sub
Button1_Click_Error:
MsgBox ("Error happened," & vbCrLf & "Please make sure!")
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
第一条是界面布局
第二第就是个FORM.SHOW 1
第三条么文本框,标签框,照片框,计时器,按键
第四条有效代码么就是你想实现什么功能,自己总结下
每五条么一个FOR NEXT;一个DO WHILE LOOP 解决
第六条么就是编好的有一定通用性的文件。例如ADO的调用,EXCEL的写入
第七条么就是MSGBOX
第八条么如果你在第六条中用了EXCEL的写入么就已经完成了
第二第就是个FORM.SHOW 1
第三条么文本框,标签框,照片框,计时器,按键
第四条有效代码么就是你想实现什么功能,自己总结下
每五条么一个FOR NEXT;一个DO WHILE LOOP 解决
第六条么就是编好的有一定通用性的文件。例如ADO的调用,EXCEL的写入
第七条么就是MSGBOX
第八条么如果你在第六条中用了EXCEL的写入么就已经完成了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你们老师给的题目好宽松啊 就是要看你们的功底 就跟写作文一样 不限文体 题目自拟 在网上不好做 你也不该骗老师 自己学学写写 不是很难啊
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
这些都是要求
题目是什么 要写一个关于什么的程序???
题目是什么 要写一个关于什么的程序???
追问
没有题目,就随便做一个程序,用VB
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询