VBA - Multiple worksheet changes in one fell swoop

JPerkins

New Member
Joined
Oct 11, 2018
Messages
1
Greetings, All. I am a VBA rookie and cannot get multiple types of changes to occur at once. Could someone offer an assist?

I am trying to compile multiple fashions of data into one visual dashboard. Shape rotations are good to go, but color changing objects (the second part) aren't working for me. Cell references are good, but code doesn't like the way that I typed it.

Here is my code:

Private Sub Worksheet_Change(ByVal Target As Range)

ActiveSheet.Shapes.Range(<wbr>Array("Main_Cluster_Dial")).<wbr>Select
Selection.ShapeRange.Rotation = Range("CQ1").Value * 260
ActiveSheet.Shapes.Range(<wbr>Array("Main_Cluster_Dial_<wbr>Secondary")).Select
Selection.ShapeRange.Rotation = Range("CQ2").Value * 260
ActiveSheet.Shapes.Range(<wbr>Array("Left_Cluster_Dial")).<wbr>Select
Selection.ShapeRange.Rotation = Range("R34").Value * 201
ActiveSheet.Shapes.Range(<wbr>Array("Right_Cluster_Dial")).<wbr>Select
Selection.ShapeRange.Rotation = Range("CP12").Value * -201
ActiveSheet.Shapes.Range(<wbr>Array("Fuel_Gauge")).Select
Selection.ShapeRange.Rotation = Range("CP8").Value * 118
ActiveCell.Select

If Intersect(Target, Range("R34")) Is Nothing Then Exit Sub
If IsNumeric(Target.Value) Then
If Target.Value < 0.9 Then
ActiveSheet.Shapes("CSI_<wbr>Blinker").Fill.ForeColor.RGB = vbRed
ElseIf Target.Value >= 0.9 And Target.Value < 0.95 Then
ActiveSheet.Shapes("CSI_<wbr>Blinker").Fill.ForeColor.RGB = vbYellow
Else
ActiveSheet.Shapes("CSI_<wbr>Blinker").Fill.ForeColor.RGB = vbGreen
End If
End If

End Sub


Any advice would be appreciated!

JP
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top