commandbutton

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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 ?
  7. 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...
  8. 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...
  9. 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...
  10. 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 ....|_|...
  11. J

    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...
  12. 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
  13. 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...
  14. A

    Commandbutton to open second page of userform

    Hey community, Can anyone help me to make commandbutton to open userforms second page? not first page
  15. 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...
  16. 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...
  17. 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*...
  18. 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...
  19. 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...
  20. E

    Command Button inside userform not calculating until userform closed

    I have a code that works...but I want it to update while the userform is open and numbers can be changed...hit commandbutton and graphs in excel modified. I don't want to close the GUI everytime for it to update...I want it to by dynamic Here is the code. Sub CommandButton1_Click()...

Watch MrExcel Video

This Week's Hot Topics

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
Top