drom
Well-known Member
- Joined
- Mar 20, 2005
- Messages
- 543
- Office Version
- 2021
- 2019
- 2016
- 2013
- 2011
- 2010
- 2007
Hi andThanks in advance!
I have the following code whithing a macro:
This code works fine when I run my macro using F8, I mean step by step
but when using F5, If wCombo2 = wCombo3 then
I am not able to apply a red color to both combos for 2 seconds
What am I missing??
I have the following code whithing a macro:
Code:
Dim wCombo2 As String: wCombo2 = Hoja04.ComboBox2.Value
Dim wCombo3 As String: wCombo3 = Hoja04.ComboBox3.Value
Dim pvTable As PivotTable: Set pvTable = Hoja04.PivotTables("PT1")
Dim pvField
If wCombo2 = wCombo3 Then
'I am trying to apply red color to both Combos
Hoja04.ComboBox2.BackColor = &HFF&: Hoja04.ComboBox3.BackColor = &HFF&
Application.ScreenUpdating = True
MsgBox "What's Wrong's Explanation", vbCritical,"Check the Red Combos"
Application.Wait (Now + TimeValue("0:00:2"))
'I return the previous color to both combos, gray color
Hoja04.ComboBox2.BackColor = &HE0E0E0: Hoja04.ComboBox3.BackColor = &HE0E0E0
Exit Sub
End If
This code works fine when I run my macro using F8, I mean step by step
but when using F5, If wCombo2 = wCombo3 then
I am not able to apply a red color to both combos for 2 seconds
What am I missing??