command button

  1. C

    Inserting formula with a macro

    Hi there, I have tried searching other threads but they were all too old and didn't really answer my problem... I have a command button that when i click it needs to insert a formula into a target cell, i have done this with another button in the same sheet and it works fine but VBA has a...
  2. A

    Delete buttons if they exist

    Hello. I would like delete a button if it exists. I cannot find the syntax that allows for the case where it doesn't exist. I would like something like If “CommandButton1” Exists Then ActiveSheet.Shapes(“CommandButton1”).Delete End If I'm not sure how to write the condition. The Delete part...
  3. S

    add vba code to existing command button code so it will delete only the shapes in a certain range

    I have a simple vba code linked to a command button to clear a range of cells. I would like to add come coding to this to delete a certain shape in the same range of cells. The shape is a: msoAutoShape code: Range("A4:S360").Select...
  4. A

    Unable to insert a separately written code into a command button

    Hi guys, This probably is a very simple question with a very simple solution but I guess I'm too ignorant about VBA yet. I tried copying the below code into a command button but it comes back with an error. I'd love it if you could explain how to solve this problem since I have many of these...
  5. R

    VBA code to send email when two cells in adjacent columns are contain specific data

    I have a code built that, upon clicking a command button, displays an email to a coworker when a cell in column P is "X". When a cell in column P is updated a date stamp is automatically entered into the adjacent cell in column Q. How do I update my code so the email displays only if the...
  6. S

    Date validation on command button

    Hi everyone, I apologise for being noob, I'm new to posting on this forum (even though I've been a member for ages!) I'm having difficulty with validation (not my own btw... Excel's) validation works fine when you enter text into a cell, but it doesn't work when you are working with a user...
  7. csababenyi

    Insert data with VBA command button into password protected sheet

    Hi Guys, I have an excel speradsheet with 22 coulunms and about 1000 rows and growing with lots of macros in it. There is an ADD command button on the main sheet that opens up a VBA scripted table that have drop downs to select data to add to the next row with another ADD DATA button in it. This...
  8. W

    cut and paste with command button into separate locations

    I am trying to cut and paste a row (and keeping the format) to another worksheet and 2 different worksheets in another workbook using a command button for rows in which column K shows a status of "Complete" and automatically save in both locations. In Sheet 1 (Profile Requests in progress) I...
  9. W

    move a row to another sheet and separate workbook based on cell value with button

    I discovered another thread close to something I am trying to do. Automatically move a row to another sheet based on cell value I am trying to do pretty much the same thing but with a button and with the copied data from columns A-M only going to 3 places at once, another sheet in the same...
  10. D

    VBA one cell returns date of last time another cell was edited

    Hello everybody, I currently have the following: Where column: I = quantity J = subtract any number entered from the quantity after which the number entered will be subtracted in column I and disappear in column J so you can enter a new one in the future J = add any number entered from the...
  11. C

    Copy Command Button caption to Clipboard

    Hello everyone. As the title say, I have multiple (at least 10 I think) cmdbuttons on a userform. I have 2 things I am looking to achieve: 1. Copy the cmdbutton captions to clipboard when clicked. This will be pasted on another program like Notepad, etc. 2. Show the cmdbutton captions on...
  12. S

    Command action button

    i need a command action button to sort a table called table1 based on column ”No. Date” from Z to A. it’s important to note that my table increases everyday so the range must not be limited to a certain limit
  13. B

    Refresh the active Private Sub

    Hi, I presently have a number of Private Subs that are triggered by Command Buttons here is an example of two of them 'Security Secret needed If Range("C37") = False And Range("C35") = False And Range("C38") = True And Range("C36") = False Then Range("H13") = Range("AN22")...
  14. F

    Userform command button - Properties

    I was wondering if it was possible to adjust the text property in a userform command button, such that there is less buffer. I have buttons which measure 24x24. In trying to show text clearly the edge distance buffer should be smaller. Can this be programmed using VBA. I am aware of other...
  15. A

    Attaching PDF files based on cell value

    Hi, I have a spreadsheet which I will require to attach and send PDF files. I need to create some functionality that a command button (or anything functional) will review a value of a particular cell and will attach the corresponding PDF files to an outgoing email. For example, if a customer...
  16. T

    Create ribbon button to run macro

    Hi, Can anyone help point me in the right direction to run the code Import_SOR_Data1 by selecting a command button in the ribbon? How to create the command button please? Also not sure if the macro is in correct place in the linked form Regards, Wayne Copy of VOID VALIDATION KCxllinestyle.xlsm
  17. D

    Add multiple Macros to single click Command Button

    Hi all, I want to reset both my data validation dropdowns and manual entry cells with a single click of the Command Button. I already have the code for the dropdowns from a previous thread, what Macro/VBA should I enter to reset all manual entry cells to blank, and how do I combine the two to a...
  18. D

    Insert Command Button to reset multiple Data Validation Dropdowns using VBA

    Hi all, I have a single worksheet with 20+ data validation dropdowns. I want to insert a Command Button that will reset all the dropdown cells to the first option on the dropdown list when I click it. Having never used Macro/VBA before, I’ve tried researching the appropriate code to make this...
  19. G

    Create a table on another sheet

    I am trying to create a table on a different sheet that is not my Activesheet using a button. This is my code so far; the problem area is in between the asterisks. Private Sub CommandButton1_Click() Set srtA = Sheets("Competitor Comparison") With srtA .ListObjects(1).Unlist...
  20. L

    Command Button: Add range of cells as body text?

    Hello, just getting stuck on a little thing here and wondered if anyone could help? I have a command button to email a sheet, it's too much information for everyone on the mailing list so I'm hoping to just pop in a data range into the .body. I'm having problems :( is there a snippet to pop...

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