Hi all,
Im trying to store a value that i derive when i run my Sub Activate_And_Dropdown_WO_Certification_ComboBox(), that gets a number from the right side of the "clicked on" shape name after the "_". This is working good, and here is the code im using for that. The "i" is the value i would like stored. However i have another macro that i need to use this derived value, and im not sure how to store/save this in my first macro so i can use it in my second. Also i dont want to run the second macro inside of the first one, it needs to be ran at a separate time. Any suggestions?
Im trying to store a value that i derive when i run my Sub Activate_And_Dropdown_WO_Certification_ComboBox(), that gets a number from the right side of the "clicked on" shape name after the "_". This is working good, and here is the code im using for that. The "i" is the value i would like stored. However i have another macro that i need to use this derived value, and im not sure how to store/save this in my first macro so i can use it in my second. Also i dont want to run the second macro inside of the first one, it needs to be ran at a separate time. Any suggestions?
Rich (BB code):
Sub Activate_And_Dropdown_WO_Certification_ComboBox()
Dim pos As Integer
Dim strlen As Integer
Dim i As String
Set Sel_Shape = ActiveSheet.Shapes(Application.Caller)
pos = InStrRev(Sel_Shape.Name, "_")
strlen = Len(Sel_Shape.Name)
i = Right(Sel_Shape.Name, strlen - pos) 'This "i" is the value i want to store'