excel vba缺少结束语句

2024-12-03 19:02:36
推荐回答(3个)
回答1:

Sub Boxes()
Dim n As Integer
Dim m As Integer
Dim i As Integer
Dim j As Integer
Dim SmallBox As Byte
Dim BigBox As Byte
Dim Charac As String
n = 2
m = 2
With Sheets("sheet2"掘则)
Do Until .Cells(n, 2) = ""
Charac = Left(.Cells(n, 2), 1)
BigBox = Right(.Cells(n, 2), Len(.Cells(n, 2)) - 1)
SmallBox = .Cells(n, 3)
Do Until Sheets("Sheet1").Cells(m, 3) = ""
m = m + 1
Loop
For i = 1 To BigBox
Sheets("Sheet1"闹唤).Cells(m, 2) = Charac & i
For j = 1 To SmallBox
Sheets("Sheet1"判弯棚).Cells(m, 3) = j
m = m + 1
Next j
Next i
n = n + 1
Loop
End With
End Sub

回答2:

程序在复制黏贴过程中可能格式会有所改变,建议检查一下每条命令是否和百度上的位置相符。

回答3:

你这段code没什么问题啊
你要什么结束语句?