我的excel 2007 宏执行提示我range的select方法无效,错误语句 Range("表4[#All]").Select
原文截取如下Sub身体使用表()''身体使用表Macro''Range("E18:L35").SelectActiveSheet.ListObjects.Add(xlSr...
原文截取如下
Sub 身体使用表()
'
' 身体使用表 Macro
'
'
Range("E18:L35").Select
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$E$18:$L$35"), , xlNo).Name = _
"表4"
Range("表4[#All]").Select (就是错在这里了,大神救我)
ActiveSheet.ListObjects("表4").TableStyle = "TableStyleLight1"
Range("H16").Select
ActiveCell.FormulaR1C1 = "身体使用表"
With ActiveCell.Characters(Start:=1, Length:=5).Font
.Name = "宋体"
.FontStyle = "加粗"
.Size = 16
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
.ThemeFont = xlThemeFontMinor
End With
Range("表4[[#Headers],[列1]]").Select
ActiveCell.FormulaR1C1 = "编号"
Range("表4[[#Headers],[列2]]").Select
ActiveCell.FormulaR1C1 = "项目"
Range("表4[[#Headers],[列3]]").Select
ActiveCell.FormulaR1C1 = "分值"
Range("表4[[#Headers],[列4]]").Select
ActiveCell.FormulaR1C1 = "实况"
Range("表4[[#Headers],[列5]]").Select
ActiveCell.FormulaR1C1 = "备注"
Range("表4[[#Headers],[实况]]").Select
ActiveCell.FormulaR1C1 = "实况"
With ActiveCell.Characters(Start:=1, Length:=2).Font
.Name = "宋体"
.FontStyle = "加粗"
.Size = 11
. 展开
Sub 身体使用表()
'
' 身体使用表 Macro
'
'
Range("E18:L35").Select
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$E$18:$L$35"), , xlNo).Name = _
"表4"
Range("表4[#All]").Select (就是错在这里了,大神救我)
ActiveSheet.ListObjects("表4").TableStyle = "TableStyleLight1"
Range("H16").Select
ActiveCell.FormulaR1C1 = "身体使用表"
With ActiveCell.Characters(Start:=1, Length:=5).Font
.Name = "宋体"
.FontStyle = "加粗"
.Size = 16
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
.ThemeFont = xlThemeFontMinor
End With
Range("表4[[#Headers],[列1]]").Select
ActiveCell.FormulaR1C1 = "编号"
Range("表4[[#Headers],[列2]]").Select
ActiveCell.FormulaR1C1 = "项目"
Range("表4[[#Headers],[列3]]").Select
ActiveCell.FormulaR1C1 = "分值"
Range("表4[[#Headers],[列4]]").Select
ActiveCell.FormulaR1C1 = "实况"
Range("表4[[#Headers],[列5]]").Select
ActiveCell.FormulaR1C1 = "备注"
Range("表4[[#Headers],[实况]]").Select
ActiveCell.FormulaR1C1 = "实况"
With ActiveCell.Characters(Start:=1, Length:=2).Font
.Name = "宋体"
.FontStyle = "加粗"
.Size = 11
. 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询