0
经与用户表单的一些问题和设置的初始值,我尝试运行如下:VBA多值设置
Sub colorme()
For Each cell In Selection
If cell.Interior.ColorIndex = UserForm1.colorcodeinit.Value Then
With cell
.Interior.ColorIndex = UserForm1.colorcodefin.Value
End With
End If
Next cell
End Sub
然而,当我尝试运行它没有注册为初始颜色我设置,以下工作就好:
Sub colorme()
For Each cell In Selection
If cell.Interior.ColorIndex = -4142 Then
With cell
.Interior.ColorIndex = UserForm1.colorcodefin.Value
End With
End If
Next cell
End Sub
感谢您的任何和所有帮助提前!