So I've got 2 pieces of code as follows:
Sub space_it_up_multi() Dim sr As ShapeRange Dim sr_counter As Long Const space_dist As Double = 1.5 Set sr = ActiveSelectionRange For sr_counter = sr.Count To 2 Step -1 sr(sr_counter - 1).BottomY = sr(sr_counter).TopY + space_dist Next sr_counterEnd Sub
____________________________________________________________________________
Sub space_it_right_multi() Dim sr As ShapeRange Dim sr_counter As Long Const space_dist As Double = 1.5 Set sr = ActiveSelectionRange For sr_counter = sr.Count To 2 Step -1 sr(sr_counter - 1).LeftX = sr(sr_counter).RightX + space_dist Next sr_counterEnd Sub
_____________________________________________________________________________
I want to code it for a userform (userform1) so that the value of "Const space_dist As Double = 1.5" for "space_it_right_multi" and "space_it_up_multi" is derrived from "Textbox1" and "Textbox2" then executed by "CommandButton1"
Any help is greatly appreciated!!!
I recently wrote a macro similar to what you describe.
If you can wait a day or two, I can add it to my blog.
Absolutely! I perform this task manually EVERY day until I found the above code. Your macro would be a phenomenal time saver.
The macro has been added to my blog: #11: Macro - "Space Between".