Mustakrakish
New Member
- Joined
- Nov 7, 2011
- Messages
- 5
Hi everybody,
I need to make a macro which will insert 3 option buttons in list, gives them names and adds to each one of them another macros i made.
So far i manage to do this:
Sub Swtich()
ActiveSheet.OptionButtons.Add(95.25, 30, 48, 17.25).Select
ActiveSheet.Shapes("Option Button 1").Select
Selection.OnAction = "PERSONAL.XLSB!srm_vlookup"
ActiveSheet.OptionButtons.Add(95.25, 30, 48, 17.25).Select
ActiveSheet.Shapes("Option Button 1").Select
Selection.OnAction = "PERSONAL.XLSB!b11_vlookup"
ActiveSheet.OptionButtons.Add(95.25, 30, 48, 17.25).Select
ActiveSheet.Shapes("Option Button 1").Select
Selection.OnAction = "PERSONAL.XLSB!t3_vlookup"
End sub
I do not know how to put buttons in line so they are not on each other and also change their names.
Main idea is to put in many sheet this buttons for changing data in one collumn so the user can compare different things with actuals.
I need to make a macro which will insert 3 option buttons in list, gives them names and adds to each one of them another macros i made.
So far i manage to do this:
Sub Swtich()
ActiveSheet.OptionButtons.Add(95.25, 30, 48, 17.25).Select
ActiveSheet.Shapes("Option Button 1").Select
Selection.OnAction = "PERSONAL.XLSB!srm_vlookup"
ActiveSheet.OptionButtons.Add(95.25, 30, 48, 17.25).Select
ActiveSheet.Shapes("Option Button 1").Select
Selection.OnAction = "PERSONAL.XLSB!b11_vlookup"
ActiveSheet.OptionButtons.Add(95.25, 30, 48, 17.25).Select
ActiveSheet.Shapes("Option Button 1").Select
Selection.OnAction = "PERSONAL.XLSB!t3_vlookup"
End sub
I do not know how to put buttons in line so they are not on each other and also change their names.
Main idea is to put in many sheet this buttons for changing data in one collumn so the user can compare different things with actuals.