commandbutton

  1. 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...
  2. 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*...
  3. 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...
  4. 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...
  5. 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()...
  6. O

    Custom Toolbar button not running full sub

    Hi All, I have created a Sub which does a few things: 1) Ask for a string 2) Queries a db with said string 3) Creates a new sheet on active workbook with the name of said string 4) Past the recordset in the new sheet If I run the Macro on its own it does everything fine. However i have now...
  7. D

    Textbox Value Equal to Value in Range on separate sheet

    Hi, I am using a textbox along with a combobox and command button. I need it to check for 4 things, 1. If there is nothing in the Textbox 2. If the Textbox value is in a range on a separate sheet 3. If the Textbox value is not in a range on a separate sheet 4. Or it should pull up the sheet...
  8. M

    Enable commandbutton based on time

    Hi Guys, I have a cell on sheet 1 which updates every second with the current time. the format of this cell is hh:mm:ss. I then have a sheet with cells for different premises again with the format hh:mm:ss. I have a command button for each premises on a page. However, i dont want anyone to be...
  9. R

    CommandButton splash screen

    Hi I am trying to have a command button open as a splash screen when I open excel. I am using the 2007 version. I have cleared all old files per issues with active-x from Dec 2014. Problem 1: I would like the commandbutton centered both vertically and horizontal so that it does not matter...
  10. S

    VBA code: safe files based on command button parameters or sub

    Hello everybody, I use a PC with windows 7 64bit and office/excel 2010. I already tried to search the forum, but didn't find anything related to this matter, or didn't know the right keywords... Recently, I inherited a few macro files, that I am trying to "clean-up" or improve now. The first...
  11. A

    Not sure how to write the code for the command button when making a userform

    Could someone kindly just look at the code and tell me what to change, Thank you this is my first time doing this and I got really confused when looking at other people examples. Underneath is a screenshot of what I'm trying to create but every time I try to add the information this error pops...
  12. T

    2 Listbox selection to a worksheet

    Hi, I have two multi column Listbox on a userform, the first listbox1 finds details about a customer Order. Listbox2 displays the current stock. Now Listbox1 is a single line selection and Listbox2 is a multi line selection, So to fill a order you select the order from Listbox1 and then the...
  13. S

    Show message and command button when cell value changes

    Dear all, I looked up several posts within this and other forums but I cannot get my code to work. One of the reasons might be that I am absolutely VBA-naive ... Here is the simple problem: I have a drop-down (via Data - Data validation - list) in cell D8 of a Excel 2013 work sheet. I inserted...
  14. C

    Problem with Command Button and textbox.setfocus

    I have a simple excel spread sheet that I am using VBA to run a form. What I want to do is when the enter key is hit on the NextRecord button (which puts the entries into my spreadsheet) I want the focus to turn back to TextBox4. Instead the cursor is moving to the next command box. I know...
  15. B

    Help with a stopwatch on a userform?

    Hi - So I'm trying to get a stopwatch on a userform that has a bunch of other fields as well. This is the code that I'm using: Dim StopTimer As Boolean Dim Etime As Single Dim Etime0 As Single Dim LastEtime As Single End Sub Private Sub TimeReset_Click() StopTimer = True Etime = 0 Etime0...
  16. Z

    How to save a userfor textbox input as a global variable to use late?

    So I am using the Private Sub CommandButton1_Click() to get some values from the user and most of them go to certain cells on my worksheet. However, there is one particular value (a dollar amount) that I do not want to store, but use later on to compare against a different value. I tried...
  17. T

    Need Help with VBA code

    Hello, I am trying to set up an order sheet and I am trying to figure out how to get a command button to do all the functions I want it to. So far I only have it inserting new line relative to the position of the command button. Private Sub CommandButton2_Click()...
  18. R

    How to create a button on each row with value having the same macro?

    Hello guys. I'm new in excel vba programming, so I dunno a lot of stuffs yet. But I'm hoping someone could help me on what I plan to do. So Here it is: I want to create a button for each row with a value on a certain range. For example: if A1 has a value, it will create a button on D1...
  19. J

    Troubles saving using ActiveX Command Button

    Hello world, I am attempting to use a single command button to save two sheets using VBA, but Excel (2010) keeps crashing on me. I'm new to VBA, have learned a ton from the members on here, and I know that I must be doing something wrong. I would like to use a command button located in Sheet1...
  20. J

    Coding combobox to set autofilter parameters in worksheet

    I am pretty new at VBA and am not sure why I am getting object error 424 Here is the code so far. Private Sub Workbook_Open()With Sheet1.ComboBox1 .AddItem "" .AddItem "5% or less" .AddItem ">5 - 15%" .AddItem ">15% - 25%" .AddItem ">25% - 35%" .AddItem ">35%" End With With Sheet1.ComboBox2...

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