excel - 单元格的vba颜色
问题描述
我需要有关 vba 的帮助如何将单元格(1,1)着色为红色
解决方案
Option Explicit
Sub Test()
'In "with statement" we include the name of workbook & the name of worksheet we want to execute the code.
With ThisWorkbook.Worksheets("Sheet1")
'Using cell referencing
.Cells(1, 1).Interior.Color = vbRed
'Using range referencing
.Range("A1").Interior.Color = vbRed
End With
End Sub
推荐阅读
- python - python从文件中提取文件时出错
- python - Numpy 的“shape”函数返回二维数组的一维值
- mysql - 我正在使用 IN 运算符,但仍然出现错误:“子查询返回超过 1 行”
- arrays - 无法使用 Pubsub 客户端将 Jsonbuffer[768] 发布到 mqtt。(控制器 esp32 Wroom 32)
- email - RFC822 的“Received:”标头定义中的“初始形式”是什么意思?
- flutter - 颤动中的DropdownButton中的多项选择
- vue.js - VUEJS - 加载后自动播放多个视频
- gitlab - 在 Gitlab CI 中按顺序运行同一阶段的作业
- autodesk-forge - 在有两个查看器的同时在两个 Forge Viewer 中轨道相同
- javascript - 从javascript函数获取http响应代码