我似乎无法自己调试我的代码。我对VBA很新,我很感激一些帮助!!!我在“SearchRange.Find(min).Select”行中收到“对象变量或未设置块”错误。提前致谢。
Sub FindStart()
Dim SelectedRange As Range, EachRow As Range, SearchRange As Range
Set SelectedRange = Selection
Set SearchRange = Rows(2)
For Each EachRow In SelectedRange.Rows
Dim min As Double
min = Module7.MinSelected(EachRow)
SearchRange.Find(min).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.399975585192419
.PatternTintAndShade = 0
End With
Next EachRow
End Sub