command button

  1. 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...
  2. 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
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. tlc53

    Auto save multiple accounts from one sheet - Simplify

    Hi, I'm wondering if there's an easier way to do this, which is user friendly and can cope with new accounts being added. Currently I have the below code, which works great. However, I have 100 accounts and the below code is for just 3 accounts. It is going to be very time consuming writing all...
  8. G

    Filling formulas over to the right into a new column added

    I have a code for a button that creates a new column at theend of a table. After the new column is added, I would like to have theformulas from the previous table column to fill into the new column. The datain the table should be the only formulas filling to the right (table headersshould not...
  9. G

    Adding a new column to end of a named range

    I have a named range on sheet Competitor Comparison Data called “CCData”. I would like to add a new column to the end of the table every time I press a button. With each button press, a new column is added to the end of the range and is then included in the named range. The new column should...
  10. G

    Add data to dynamic range

    I have a dynamic range that expands when I add new data(naturally). I would like to add code to a button that I have that will adddata to the range when the button is pressed. This is the line of code I amworking with: Sheets("Competitor OverviewData").Range("CompetitorsLOV").Offset(1, 0).Value...
  11. G

    Create defined name based off another cells value

    Hi, I am trying to design code to create a defined name for a cell based off the value of another cell. The cell that contains the name that I would like to be the defined name is in cell (“C2”). The cell that I would like to obtain the defined name is the cell above the new column create from...
  12. G

    Assigning a formula to a button

    Hi, I would like to be able to assign a command button to add anew column to the end of my table. Each new column added should appear to theright of the last new column added. The command button will be on theactivesheet but the table in which I am trying to add columns to will be onsheet...
  13. G

    Button to add column to the end of a table

    Hi, I would like to be able to assign a command button to add a new column to the end of my table. Each new column added should appear to the right of the last new column add. The command button will be on the activesheet but the table in which I am trying to add columns to will be on sheet...
  14. A

    2 Command buttons to perform 2 simple task

    Can i have a command button on my dynamic worksheets to perform the below function (I have created a button to copy the work sheet, so the new buttons would be copied too ). 1. View button - to highlight or show a range of cells / table in the worksheet 2. Color button- selected cell would be...
  15. T

    Combine two Subs into One (Using One Button)

    Hi All I currently have a worksheet with two command buttons by pressing one it hides all columns in a range that are blank, the other unhides all columns in that range. Is there a way to combine the two so i can use just one button "Hide/Unhide"? This is the code i have to hide columns: Dim...
  16. Z

    How to pass public variable value from user form command button to other module

    I have a macro that calls a user form. When the user clicks the "ok" button on the user form, a command-button-click macro runs, which sets a global variable ("formVal" to the value of one of the form fields. All that works well. My issue is when I then run a macro in a different module (but...
  17. tlc53

    Multiple Macros on one Command Button

    Hi, Is it possible to run more than one macro on a Command Button and if so, how do I go about doing it? My Code below works for one macro (PDFRentalStmtNo1) but returns an error once I add the other two (Asset_Hide_Pro_1 and Asset_Hide_Chat_1). Thank you! Private Sub CommandButton1_Click()...
  18. tlc53

    Hide Command Button

    Hi, I'm trying to hide a command button if cell D8 does not equal 1, 2, 3 or 4. D8 is a dropdown, so changes manually. I have the following code below (which may or may not work) but I'm having difficulty including it with my other code (also below) as I keep getting errors. Can someone help me...
  19. U

    Command buttons not working on all machines

    I've been making up a workbook for material summaries at work, and I'm finding a problem on 2 of 4 computers running it so far. Here's what happens: There's some command buttons shown in the picture. the mouse is hovered over the 'refresh summary' button (circled in black). (the cursor isn't...
  20. S

    Referencing command button from active sheet

    Hello, Need help in the below code. I am calling a command button sub procedure using the loop. When I did it without loop I used Sheet3.CommandButton3_Click and it worked fine. But, then I am doing it using loop then I change it to ActiveSheet.CommandButton3_Click which is throwing error...

Some videos you may like

This Week's Hot Topics