Shazam
09-28-2005, 05:06 PM
Good Afternoon,
I have this workbook that I run a simple macro on it and it also import a module to the workbook. The module contains 4 macros. The problem is I have 4 Option Buttons on the workbook and I assigning each button from the 4 macros of the module. I thought by recording a simple macro and assigning those macros to the Option Buttons will be fine. But the next day I ran the macro it did not assign the 4 macros to the 4 Option Buttons. Why is that ? Is there something I'm missing ?
Here is the code that I ran a simple macro to assign to the Option Buttons.
Sub Assing_Option_Buttons()
ActiveSheet.Shapes("Option Button 1").Select
Selection.OnAction = "Sort_Wip"
ActiveSheet.Shapes("Option Button 2").Select
Selection.OnAction = "Sort_Fgs"
ActiveSheet.Shapes("Option Button 3").Select
Selection.OnAction = "Highlight_Negatives"
ActiveSheet.Shapes("Option Button 4").Select
Selection.OnAction = "Sum_Negatives"
Range("F5").Select
End Sub
I'm getting complaints from the users they said when they select the option buttons it gives them a message that personal.xls does not exist. Is there a certain code that it will assing thoses macros from the workbook module to the correct Option Buttons on the worksheet ?
I have this workbook that I run a simple macro on it and it also import a module to the workbook. The module contains 4 macros. The problem is I have 4 Option Buttons on the workbook and I assigning each button from the 4 macros of the module. I thought by recording a simple macro and assigning those macros to the Option Buttons will be fine. But the next day I ran the macro it did not assign the 4 macros to the 4 Option Buttons. Why is that ? Is there something I'm missing ?
Here is the code that I ran a simple macro to assign to the Option Buttons.
Sub Assing_Option_Buttons()
ActiveSheet.Shapes("Option Button 1").Select
Selection.OnAction = "Sort_Wip"
ActiveSheet.Shapes("Option Button 2").Select
Selection.OnAction = "Sort_Fgs"
ActiveSheet.Shapes("Option Button 3").Select
Selection.OnAction = "Highlight_Negatives"
ActiveSheet.Shapes("Option Button 4").Select
Selection.OnAction = "Sum_Negatives"
Range("F5").Select
End Sub
I'm getting complaints from the users they said when they select the option buttons it gives them a message that personal.xls does not exist. Is there a certain code that it will assing thoses macros from the workbook module to the correct Option Buttons on the worksheet ?