Running macros in a form control list box

Shadkng

Active Member
Joined
Oct 11, 2018
Messages
370
I have been searching the internet for hours and I cannot seem to find a clear method for the following. I would like to have several macros listed in a list box that when selected will run. I currently have a bunch of form control buttons on my sheets and it's getting messy. I am able to do it easily using a data validation list box and naming the macros in the code which I found online. However, I would like to make the list using a form control list box - I guess an active-x list box so I can have more control over the size, font, etc. I know how to make the active-x list box and name the range where the macros are listed, but I don't know what code to use. If there is another approach to solve my issue I am certainly open to it. Thanks
 
Hi, I have to say it's working perfectly. I added another sheet with a combobox and it's working fine. and I still have to add several more. I'm following the same system so I expect them to work fine.

I asked a question that I probably know the question - that all subs that run when you open a workbook have to reside in "thisworkbook" module. And you can have many in there if need be.

Right now I don't think I need any additional macros to run when the workbook is open, but let me think about it. Now that I know these things are possible I may think of a need.

Are you allowed to help me with other minor excel issues not related to this topic?

Thanks for being persistent with me - I might have given up. What other things do you want to talk about? I'll be in touch soon on my progress.
 
Upvote 0

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Sure ask away.

Again like I said it would depend on what the script was suppose to do.

Give me a example

But yes you can do it.

It would look like this:

Call Me
Call You
Call Us
 
Upvote 0
If you have a script and you want to enter George into Range("A1")

You could write it like this if your Command button to run the script was in the same sheet.

Cells(1,1).Value="George"

But if you wanted to run this script on Workbook Open you would need to write script like this:

Sheets("People").Cells(1,1).value="George"

See you would have to specify in the script the Exact sheet name.
 
Upvote 0
Did you say it’s ok to ask you questions on other via issues not related directly to what we have been discussing?
 
Upvote 0
Is there a way to bold just the text in RED in this formula?

=IF(FINALORDER!$B25="ABOVE DUAL SHADES","ABOVE DUAL SHADES",IF(FINALORDER!$HD25="","",(FINALORDER!$HD25)&" - "&(FINALORDER!$D25)))
 
Upvote 0
I'm a Vba Person and know a lot about Vba.

But I'm not good at using Formulas.

I would think you should start a new question in the Forum for this question.


Sorry.
 
Upvote 0
Hello Shadkng and My Aswer Is This


I've been following this very interesting thread right from its beginning. Now that it seems to be coming to an end, I'd like to offer my thoughts and comments.


To My Aswer Is This: I want to CONGRATULATE you on your patience. You are a very good instructor. I don't know about Shadkng, but I found your examples to be quite useful. It helps to not only have some process described in words, but to also see an example of how something should look. I like the way you described the process in detail, step by step which is exactly what a person that doesn't fully understand, needs to receive. GOOD JOB! (By the way, I love your avatar. It's a perfect description of programming and I laugh every time I see it.)



To Shadkng: Reading your comments and questions, I could feel your frustration about the whole process. Programing can be very frustrating at times because there is nothing more stubborn than the computer in demanding something be done a certain way. If I may be so bold as to offer a little piece of advice, don't be to hard on yourself. It takes time and patience to master coding, and I'm sure My Aswer Is This will agree with me. The main thing is to be persistent, stubborn and have a strong determination to 'stick with it.' What you have learned here, will play a large part in any future programing you do, because as you've seen, it is not only the code itself that is important, but where it is placed. I ADMIRE you for hanging in there until you figured out what was needed. There isn't a person on this site that hasn't gone through what you have here. You seem to have a strong desire to not only have some code that works, but to understand how and why it works. This is 90% of the battle. Keep thinking this way and you'll make a fine programmer.



The following link will
take you to answers to some questions about programming that was asked by another individual. I apologize in advance for the way my answers there did not format properly. I have no idea what went wrong but the site would not let me change anything. The comment by Mr. Rick Rothstein emphasizes what I've said here about patience.


https://www.mrexcel.com/forum/lounge-v-2-0/1082674-education-knowledge-background.html



TotallyConfused
 
Upvote 0
Is there a way to bold just the text in RED in this formula?

=IF(FINALORDER!$B25="ABOVE DUAL SHADES","ABOVE DUAL SHADES",IF(FINALORDER!$HD25="","",(FINALORDER!$HD25)&" - "&(FINALORDER!$D25)))

Hello Shadkng
I'm not sure if this is what you are looking for or not, but you might try formatting that one cell to be BOLD. That should put in bold print any result from your formula, however, I think it would bold print numbers also. How to get Excel to only bold print text, I would think would be some kind of Conditional Formatting. I'm sorry, but that level of programming is beyond my knowledge. If you're not sure how to set the cell to bold print, try this:

Right click on the cell
Left click on 'Format Cells'
Left click on 'Font'
Left click on 'Bold'
Left click on 'OK'

TotallyConfused
 
Upvote 0
TotallyConfused:
Thanks for your kind comments. Glad to see you were watching.

Hello Shadkng and My Aswer Is This


I've been following this very interesting thread right from its beginning. Now that it seems to be coming to an end, I'd like to offer my thoughts and comments.


To My Aswer Is This: I want to CONGRATULATE you on your patience. You are a very good instructor. I don't know about Shadkng, but I found your examples to be quite useful. It helps to not only have some process described in words, but to also see an example of how something should look. I like the way you described the process in detail, step by step which is exactly what a person that doesn't fully understand, needs to receive. GOOD JOB! (By the way, I love your avatar. It's a perfect description of programming and I laugh every time I see it.)



To Shadkng: Reading your comments and questions, I could feel your frustration about the whole process. Programing can be very frustrating at times because there is nothing more stubborn than the computer in demanding something be done a certain way. If I may be so bold as to offer a little piece of advice, don't be to hard on yourself. It takes time and patience to master coding, and I'm sure My Aswer Is This will agree with me. The main thing is to be persistent, stubborn and have a strong determination to 'stick with it.' What you have learned here, will play a large part in any future programing you do, because as you've seen, it is not only the code itself that is important, but where it is placed. I ADMIRE you for hanging in there until you figured out what was needed. There isn't a person on this site that hasn't gone through what you have here. You seem to have a strong desire to not only have some code that works, but to understand how and why it works. This is 90% of the battle. Keep thinking this way and you'll make a fine programmer.



The following link will
take you to answers to some questions about programming that was asked by another individual. I apologize in advance for the way my answers there did not format properly. I have no idea what went wrong but the site would not let me change anything. The comment by Mr. Rick Rothstein emphasizes what I've said here about patience.


https://www.mrexcel.com/forum/lounge-v-2-0/1082674-education-knowledge-background.html



TotallyConfused
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,315
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top