excel - 对象 _Global 的范围 1004 失败
问题描述
我已经记录了一个宏,如果我使用新数据(它每个月都会改变),它会不断给我以下错误(带星号)。该宏与我创建宏的原始数据完美配合。我已经很长时间没有使用宏了,所以我希望能简单地描述一下该怎么做!谢谢
Range("AK5").Select
ActiveCell.FormulaR1C1 = "Received"
Range("AL5").Select
ActiveCell.FormulaR1C1 = "No. of Students"
Range("AM5").Select
ActiveCell.FormulaR1C1 = "Student Name"
Range("AN5").Select
ActiveCell.FormulaR1C1 = "Student ID"
Range("AO5").Select
ActiveCell.FormulaR1C1 = "Month"
Range("AP5").Select
ActiveCell.FormulaR1C1 = "Department"
Range("AQ5").Select
ActiveCell.FormulaR1C1 = "Type"
Range("AR5").Select
ActiveCell.FormulaR1C1 = "YoS"
**Range("Table1[[#Headers],[Received]:[YoS]]").Select**
Range("Table1[[#Headers],[YoS]]").Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent4
.TintAndShade = 0
.PatternTintAndShade = 0
End With
解决方案
推荐阅读
- r - 查找我在 R 中已有数据的缺失值
- css - 使用 Material-Ui 和 CSS 水平对齐标题
- bash - 如何一次遍历两行文本?
- virtual-machine - How do I get rid of the 'Shared Y-STAT not available’ message that appears at logon? (CMS on z/VM)
- python - 此源代码中的 if 语句有什么问题?
- jenkins - Jenkins:基于布尔参数开始构建多个项目
- php - ImageMagick在将.ai文件转换为png时添加白色背景
- c# - 如何保持 asp.net core web api 应用程序始终打开以避免 AKS 中托管的冷/空闲问题
- ios - SqfliteDatabaseException (DatabaseException(database_closed))
- php - 在管理员订单和管理员电子邮件中显示 Woocommerce 结帐自定义字段 - 复选框