vba语言,如何定义一个整数,以及如何运用and条件?Sub-查字典问答网
分类选择

来自冷晟的问题

  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这个命令,比如这个条件成立并且另个条件也成立才会执行此命令.这样的语句要怎么写?

1回答
2019-12-25 02:49
我要回答
请先登录
何超

  dimyasinteger

  fory=2to10000000

  next

  *****

  ifA&Bthen

  endfi

2019-12-25 02:53:03

最新问答

推荐文章

猜你喜欢

附近的人在看

推荐阅读

拓展阅读

  • 大家都在看
  • 小编推荐
  • 猜你喜欢
  •