vba内存溢出怎么解决?
Subtext()DimaAsByteDimqAsRangeFori=1To10Step1a=0+iSetq=Sheet1.Cells=Cells(a,1)=aNextF...
Sub text()
Dim a As Byte
Dim q As Range
For i = 1 To 10 Step 1
a = 0 + i
Set q = Sheet1.Cells = Cells(a, 1) = a
Next
For i = 11 To 20 Step 1
a = 0 + i
Set q = Sheet1.Cells = Cells(a, 2) = a
Next
Stop
End Sub
运行这个代码时提示内存溢出,这个是什么原因?怎么改 展开
Dim a As Byte
Dim q As Range
For i = 1 To 10 Step 1
a = 0 + i
Set q = Sheet1.Cells = Cells(a, 1) = a
Next
For i = 11 To 20 Step 1
a = 0 + i
Set q = Sheet1.Cells = Cells(a, 2) = a
Next
Stop
End Sub
运行这个代码时提示内存溢出,这个是什么原因?怎么改 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询