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
感謝您的任何和所有幫助提前!