tonywatsonhelp
Well-known Member
- Joined
- Feb 24, 2014
- Messages
- 3,187
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Hi everybody,
In my excel workbook i have rectangle shapes that i move around the screen using a macro to highlight an area in a chart,
its pretty basic stuff its just a rectangle shape that moves according to the commands of the macros as shown below
(this is the one to move it up a notch! )
This works perfectly,
however always looking to save time and energy i was wondering if i could improve it?
basically at the moment this works on the active workbook but every workbook is the same
so i was wondering if there would be a way to take this macro and when i run it, have it run on ever tab?
there are a few problems,
1 i don't know what the tabs will be called
2 there are 3 tabs i dont want to include called "Master" "Data" & "Charts"
so how can i get this macro to run on the selected tab then go through all the other tabs in the workbook other then the 3 i mentioned then return back to the current tab?
any ideas as i'm yet again a bit stuck!
Thanks
Tony
In my excel workbook i have rectangle shapes that i move around the screen using a macro to highlight an area in a chart,
its pretty basic stuff its just a rectangle shape that moves according to the commands of the macros as shown below
(this is the one to move it up a notch! )
Code:
Sub zzBlueSquaremoveup11()
ActiveSheet.Unprotect
Application.ScreenUpdating = False
ActiveSheet.Shapes.Range(Array(Range("EY3"))).Select
Selection.ShapeRange.IncrementTop -10
ActiveSheet.Protect
Application.ScreenUpdating = True
End Sub
however always looking to save time and energy i was wondering if i could improve it?
basically at the moment this works on the active workbook but every workbook is the same
so i was wondering if there would be a way to take this macro and when i run it, have it run on ever tab?
there are a few problems,
1 i don't know what the tabs will be called
2 there are 3 tabs i dont want to include called "Master" "Data" & "Charts"
so how can i get this macro to run on the selected tab then go through all the other tabs in the workbook other then the 3 i mentioned then return back to the current tab?
any ideas as i'm yet again a bit stuck!
Thanks
Tony