循环语句解释Private Sub CommandButton1_Click() Dim icell,x,m,y As
来源:学生作业帮 编辑:搜狗做题网作业帮 分类:综合作业 时间:2024/04/30 19:47:25
循环语句解释
Private Sub CommandButton1_Click() Dim icell,x,m,y As Integer Dim CELL,CELLT,CELLR As String x = 0 CELLT = "" CELL = "" CELLR = "" y = 1
Sheets("Sheet2").Select Sheet2.Cells.Select Selection.ClearContents Sheets("Sheet1").Select
m = 1 Do Until Sheet1.Cells(m,1).Value = "" m = m + 1 x = x + 1 Loop Sheet2.Cells(1,1).Value = "CELL" Sheet2.Cells(1,2).Value = "CELLR" For icell = 2 To m
CELLT = Sheet1.Cells(icell,1).Value
If CELL = "" Then CELL = CELLT CELLR = Trim(Sheet1.Cells(icell,2).Value) ElseIf CELLT CELL Then y = y + 1 Sheet2.Cells(y,1).Value = CELL Sheet2.Cells(y,2).Value = CELLR CELL = CELLT CELLR = Trim(Sheet1.Cells(icell,2).Value) ElseIf CELLT = CELL Then CELLR = Trim(CELLR) & " " & Sheet1.Cells(icell,2).Value ElseIf CELLT = "" Then y = y + 1 Sheet2.Cells(y,1).Value = CELL Sheet2.Cells(y,2).Value = CELLR End If Next End Sub
Private Sub CommandButton1_Click() Dim icell,x,m,y As Integer Dim CELL,CELLT,CELLR As String x = 0 CELLT = "" CELL = "" CELLR = "" y = 1
Sheets("Sheet2").Select Sheet2.Cells.Select Selection.ClearContents Sheets("Sheet1").Select
m = 1 Do Until Sheet1.Cells(m,1).Value = "" m = m + 1 x = x + 1 Loop Sheet2.Cells(1,1).Value = "CELL" Sheet2.Cells(1,2).Value = "CELLR" For icell = 2 To m
CELLT = Sheet1.Cells(icell,1).Value
If CELL = "" Then CELL = CELLT CELLR = Trim(Sheet1.Cells(icell,2).Value) ElseIf CELLT CELL Then y = y + 1 Sheet2.Cells(y,1).Value = CELL Sheet2.Cells(y,2).Value = CELLR CELL = CELLT CELLR = Trim(Sheet1.Cells(icell,2).Value) ElseIf CELLT = CELL Then CELLR = Trim(CELLR) & " " & Sheet1.Cells(icell,2).Value ElseIf CELLT = "" Then y = y + 1 Sheet2.Cells(y,1).Value = CELL Sheet2.Cells(y,2).Value = CELLR End If Next End Sub
VB的 Excel 操作?代码很乱哎~sheet1 copy到 sheet2?
循环语句解释Private Sub CommandButton1_Click() Dim icell,x,m,y As
VB while语句Private Sub Command2_Click()Dim x As SingleDim y A
Private Sub Command1_Click() Dim x As Single,y As Single Pic
Private Sub Command1_Click() Dim i As Double,M As Double,L A
33.设有如下程序Private Sub Command1_Click( )Dim sum As Double,x As
几道VB程序题,Private Sub Command1_Click()Dim x As Integerx = Val(
VB Private Sub Command1_Click()Dim x As Integerx = 15768Prin
问一道VB填空题:Private Sub Form_Click() Dim x As Integ
麻烦解释这个程序Private Sub pl(x As Integer,ByVal y As Integer)x = 4
Private Sub Form_Click() Dim a As Integer,b As Integer,k As
Private Sub Command1_Click() Dim i As Integer,s As Integer,n
0402 Private Sub Command1_Click() Dim a As Single,b As Singl