vba语言,如何定义一个整数,以及如何运用and条件?Subimprimir()Sheets("imprimir").SelectActiveWindow.SelectedSheets.PrintOutWithSheets("regostro")x=.Range("a1000000").End(xlUp).Row+1Fori=0To33.Cells(x+i,1)=[I7].Cells(x+i
vba语言,如何定义一个整数,以及如何运用and条件?
Subimprimir()
Sheets("imprimir").Select
ActiveWindow.SelectedSheets.PrintOut
WithSheets("regostro")
x=.Range("a1000000").End(xlUp).Row+1
Fori=0To33
.Cells(x+i,1)=[I7]
.Cells(x+i,2)=[a4]
.Cells(x+i,3)=[a5]
.Cells(x+i,4)=[a6]
.Cells(x+i,5)=Cells(i+10,5)
.Cells(x+i,6)=Cells(i+10,9)
.Cells(x+i,7)=Cells(i+10,1)
.Cells(x+i,8)=Cells(i+10,11)
.Cells(x+i,9)=Cells(i+10,12)
Nexti
EndWith
DimyAsInteger
IfSheets("regostro").Cells(y,1)=""Then
Sheets("regostro").Cells(y,1).EntireRow.Delete
EndIf
EndSub
我要定义y为一个从2到1000000的整数,请问怎么定?还有如何写and这个命令,比如这个条件成立并且另个条件也成立才会执行此命令.这样的语句要怎么写?