我在excel里录制了一段宏,请问如何让此段宏对每个工作表都能执行
SubMacro1()''Macro1MacroSh.Columns("J:J").SelectWithSelection.Validation.Delete.AddTy...
Sub Macro1()
'
' Macro1 Macro
Sh.Columns("J:J").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="是,否"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.IMEMode = xlIMEModeNoControl
.ShowInput = True
.ShowError = True
End With
Next
End Sub
如何让此段代码不用手动一个个工作表点,而是直接运行就让所有sheet都运行此段代码 展开
'
' Macro1 Macro
Sh.Columns("J:J").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="是,否"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.IMEMode = xlIMEModeNoControl
.ShowInput = True
.ShowError = True
End With
Next
End Sub
如何让此段代码不用手动一个个工作表点,而是直接运行就让所有sheet都运行此段代码 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询