Deladier
Board Regular
- Joined
- May 4, 2005
- Messages
- 131
- Office Version
- 365
- Platform
- Windows
Hello.
Using a ComboBox, per example, I could call either Macro6 or Macro7 in order to change color of my Freeform object, but after Macro6 or Macro7 has ran, Freeform remains selected.
I could select any cell to deselect Freeform, or using ESC code, but anyway that's not what I want, the idea is not to leave ComboBox.
Or an alternative to the problem:
Is there some way in Macro6 and Macro7 of not selecting Freeform from the begining, just directly to change the color of the Freeform, avoiding that Freeform being selected at last?
Macro6 and Macro7 code description:
Sub Macro6()
ActiveSheet.Shapes.Range(Array("Freeform 161")).Select 'Yellow color
With Selection.ShapeRange.Line
.Visible = msoTrue
.ForeColor.RGB = RGB(255, 192, 0)
.Transparency = 0
End With
End Sub
Sub Macro7()
ActiveSheet.Shapes.Range(Array("Freeform 161")).Select 'Brown color
With Selection.ShapeRange.Line
.Visible = msoTrue
.ForeColor.TintAndShade = 0
.ForeColor.Brightness = -0.5
.Transparency = 0
End With
End Sub
Using a ComboBox, per example, I could call either Macro6 or Macro7 in order to change color of my Freeform object, but after Macro6 or Macro7 has ran, Freeform remains selected.
I could select any cell to deselect Freeform, or using ESC code, but anyway that's not what I want, the idea is not to leave ComboBox.
Or an alternative to the problem:
Is there some way in Macro6 and Macro7 of not selecting Freeform from the begining, just directly to change the color of the Freeform, avoiding that Freeform being selected at last?
Macro6 and Macro7 code description:
Sub Macro6()
ActiveSheet.Shapes.Range(Array("Freeform 161")).Select 'Yellow color
With Selection.ShapeRange.Line
.Visible = msoTrue
.ForeColor.RGB = RGB(255, 192, 0)
.Transparency = 0
End With
End Sub
Sub Macro7()
ActiveSheet.Shapes.Range(Array("Freeform 161")).Select 'Brown color
With Selection.ShapeRange.Line
.Visible = msoTrue
.ForeColor.TintAndShade = 0
.ForeColor.Brightness = -0.5
.Transparency = 0
End With
End Sub