1.单元格取值赋值

Private Sub CommandButton1_Click()
Range(
"A1"= "111"
Range(
"A2").Value = "2222"
Range(
"A10"= Range("A1")
Range(
"A11"= Cells(21).Value
Range(
"A12"= Cells(21)

Range("A13").ClearContents         '清除内容

 

 

Range("a20").Formula = "=rand()"  '单无格公式

End Sub

 

2.单元格设置颜色

Cells(11).Interior.ColorIndex = 3 '单无格的颜色   

         

相关文章:

  • 2021-08-11
  • 2021-11-13
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
  • 2021-07-06
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-16
  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
  • 2021-08-07
  • 2022-12-23
  • 2021-09-18
相关资源
相似解决方案