下面有一个代码,它在活动工作表中完美运行,
Sub NYTimes()
'
' MMto000 Macro
Dim MyRange As Range, MyCell As Range
Set MyRange = Range("K13:M2000,U13:W2000,AI13:AJ2000")
For Each MyCell In MyRange
If MyCell.Value > 0 Then
MyCell.Value = MyCell.Value * 1000
End If
Next MyCell
End Sub
我想通过活动工作簿中的所有工作表运行此代码。所以我写了下面的代码,但它没有用。非常感谢对这家工厂的任何帮助。
Sub NYTimes()
'
' MMto000 Macro
Dim MyRange As Range, MyCell As Range
Dim Current As Worksheet
For Each Current In Worksheets
Set MyRange = Range("K13:M2000,U13:W2000,AI13:AJ2000")
For Each MyCell In MyRange
If MyCell.Value > 0 Then
MyCell.Value = MyCell.Value * 1000
End If
Next MyCell
Next
End Sub