1. B

    Change color of CommandButtons in a Loop in UserForm

    Hello, I'd like to make this kind of template in USerForm I'm writing code to change CommandButton color based on excel cell. CommandButton color will be the same like excell's cell color. I', able to do it one by one as below just for few buttons with number 1: If...
  2. Jaafar Tribak

    Can we place an Icon and a Caption on a CommandButton ?

    Hi, I have a commandbutton on a userform and I want place on it an icon and a descriptive text below it. Based on a couple of testings, I managed to add an icon to the commandbutton without obscuring the caption text BUT it only works if the icon is very small (16x16) which results in a...
  3. S

    Locking CommandButton in UserForm in VBA

    Hi Everyone. I am trying to write a VBA code where the UserForm resizes dynamically depending on values retrieved from cell counts. I have worked that out but I need to have the CommandButton locked to the lower right-hand corner of the UserForm so that it can easily be clicked once the data...
  4. C

    Textbox to Textbox, Hyperlinks to desired browser, Reset CommandButton, Open another Sheet while UserForm is open

    Hello All, As the title says (i am not sure if this kind of title is allowed, kinda desperate for help), I have a few queries about my current worksheet. Below is my code for my checkboxes and comboboxes captions to appear on my TextBox3. Shoutout to @DanteAmor for these codes. What I want to...
  5. R

    CommandButtons not working.

    Hello, I have a Navigation tab in a workbook that has buttons to take you to specific sheets. I have written code so that when the "Plastics" option button is selected columns I:Q are hidden and all buttons within those rows are hidden. Private Sub OptionButton2_Click() '''''''Plastics...
  6. J

    Running a Macro based on a Value through a Command Button

    Hi, Here is the problem in a nutshell. I Made several macros that create emails. Basically, I have a drop down list that has the title of each of these emails. I would like there to be a command button adjacent to this drop down list that, when clicked, will run the macro for the...
  7. D

    Add commandbutton on any excel sheets

    Hi all, Does anybody know how to add a commandbutton on any existing excel sheet ? Imagine I have a commandbutton with that code Sub auto_open() F_Onglets.Show End Sub How to see this command button on any excel sheet, already existing and the new ones created ?
  8. A

    Excel Command Button For Swapping 2 Cells

    Hi I have two values in non adjacent cells (C4 and J4) that I wish to swap between them by clicking a single command button, and that can be done any number of times needed. I know how to insert a command button but I really don't know VBA coding. I googled my problem but I can't manage to find...
  9. J

    Multiple Macro scripts with 1 command button

    Greetings, I'm trying to have two VBA statements run with 1 command button in my excel workbook. is that possible? I'm VERY new to VBA and macro's and I do not have a reference book handy at the moment. any tips would be grateful! Sub Enable_events() Application.EnableEvents = True End Sub...
  10. M

    Transfer CommandButtons to another workbook using VBA

    Hello, I'm trying to Copy 4 ActiveX CommandButtons from one Workbook, each named "CommandButton1", 2, 3 and 4"and Paste onto another. I have a code that successfully copies it over but if the Target Workbook already has a CommandButton1-4, the copied Button will continue in sequence and name...
  11. R

    Hide Rows just before file is saved via commandbutton doesn't work

    Ok, I'm getting nuts. I have an Excel file with Checkboxes on sheet 'RBD' I have a checkbox for each title. And each title has several checkboxes for the options |_| ANIMALS ....|_| Cow ....|_| Pig ....|_| Chicken ....|_| Other |_| FLOWERS ....|_| Rose ....|_| Tulip ....|_|...
  12. I

    Using Shape as CommandButton

    Hi everyone I have a sort of "shapes" that I would like to use as a commandbutton or togglebutton. What I would like do is when i click on a certain shape, it recorded in the worksheet and gives its name'shape. How to do it? In an attempt I used the code below without success. I need your help...
  13. N

    Macro Run when OptionButton enabled

    my userform contians OptionButton1 OptionButton2 Command Button macro 1 macro2 i need when OptionButton1 is Enabled and click on commandButton than Macro1 is run Or when OptionBUtton2 is Enabled and click on CommandButton than macro2 is run how it works
  14. R

    Return to Command Button after entering data

    Is there a way to return to a CommanButton after entering data? I am matching a barcode to a column of data, it automatically moves to the next column and enters a time/date stamp then moves to the next column for manually entering a sample weight. After entering the sample weight, I would...
  15. Akbarov

    Commandbutton to open second page of userform

    Hey community, Can anyone help me to make commandbutton to open userforms second page? not first page
  16. L

    CommandButton help

    Hi everyone. I'm a complete noob so appreciate any help you all can provide. I'm trying to edit the below code so that when a CommandButton is clicked, it allows me to copy row data from a different tab "QRR Template" and paste/transpose the data on the tab where the button is located. I'd...
  17. T

    Excel table to mail via Commandbutton.

    Hello, im trying to figure out how to make this code better. currently the code only takes one row,since its based on cell position. Dim i As Integer, Mail_Object, Email_Subject, o As Variant Dim TypeS As String TypeS = ActiveSheet.ListObjects("Orderoversikt").ListColumns(1).Range.Column...
  18. R

    Excel 2010 - runtime error 1004

    Hello All,<o:p></o:p> I have a userform setting in my worksheet. I added a few textbox on it. After that I get this error message “Run Timeerror 1004 application-define or object-defined error”. I clicked the debugger and this what came outand it highlighted the error “sht.Range(headerArr(a*...
  19. W

    Macro for Inserting Picture to Cell

    Hey all, I've been looking high and low on this site and others for help with a Macro I am trying to write and looking for some tips. I am looking to do these things: 1. Click CommandButton 2. Pull up the insert picture dialogue 3. Have picture selected inserted to specific cell It seems...
  20. H

    Assign marco to commandbutton to Insert Hyperlink

    I'm new and struggling with this function of hyperlinking. I'm using a userform where I have a commandbutton. I would like the commandbutton (when clicked) to create a hyperlink - basically, take me to the Insert Hyperlink window, where I can edit/assign my own hyperlinks. I've scoured the...
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

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
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 "".
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