I have been searching for an answer for this fix but I have not had any luck. This is what I need help with:
1. I have created command buttons to scroll left and right in an excel sheet 2 columns at a time. It also keeps a column count is cell E40.
2. I have 4 charts, Locations K30, P30, J46, J61.
3. When i use the command button to shift the columns I want to shift the chart locations.
For example Scroll ToLeft:=2 chart locations become M30, R30, L46, L61.
Private Sub PREV_WEEK_Click()
ActiveWindow.SmallScroll ToRight:=-2
If Range("E40").Value = 1 Then
Exit Sub
End If
Range("E40").Value = Range("E40").Value - 2
End Sub
Private Sub NEXT_WEEK_Click()
ActiveWindow.SmallScroll ToRight:=2
Range("E40").Value = Range("E40").Value + 2
End Sub
1. I have created command buttons to scroll left and right in an excel sheet 2 columns at a time. It also keeps a column count is cell E40.
2. I have 4 charts, Locations K30, P30, J46, J61.
3. When i use the command button to shift the columns I want to shift the chart locations.
For example Scroll ToLeft:=2 chart locations become M30, R30, L46, L61.
Private Sub PREV_WEEK_Click()
ActiveWindow.SmallScroll ToRight:=-2
If Range("E40").Value = 1 Then
Exit Sub
End If
Range("E40").Value = Range("E40").Value - 2
End Sub
Private Sub NEXT_WEEK_Click()
ActiveWindow.SmallScroll ToRight:=2
Range("E40").Value = Range("E40").Value + 2
End Sub