1. S

    creating a button and then adding the code

    I'd like a piece of code that can create a button that perfectly covers cell A1 and then runs the following piece of code for only that row, not every row as the code was originally designed. Thank you for your help. Also, and the important part, it has to check if there are contents in column I...
  2. K

    VBA code: msg box if sum of cells do not equal cell "A1"

    I need a code to stop the other codes from running if the sum of cells O16:O26 do not equal cell O10. Also need the msgbox warning. This is what I've found so far. It's not working for me. Can anyone help? :) Private Sub Worksheet_Change(ByVal Target As Range) If...
  3. SlinkRN

    Button needing 2 clicks after changing focus to another program

    Hi all, I am using an Excel automated sheet to prompt users on what to enter into another program. After they switch focus to the other program (not Excel) to enter data, when they come back over to the Excel sheet, the button shape that I have added with code attached only works on the second...
  4. M

    Creating new worksheets that are named to be dates

    Hi, I am new to VBA and trying to create a form for a gas station. The form is made so a user can enter sales information and it will calculate month to date totals as pages are added through a new day button at the top. The button should create a new sheet that is named as the next day. The...
  5. N

    VBA - User form call in excel button

    Hi Team, I made a user form macro. It is successfully run in vba by pressing F5. I want a button in excel sheet, so that user can click on button and my User form will call. thanks, Nitin
  6. JenniferMurphy

    Can a subfunction return an error on behalf of the caller?

    If Function A is called from an Excel cell and then calls Sub B, is there any way that B can return an error condition directly back to the Excel cell on behalf of A without returning control to A? I am working on a UDF (A) that does a lot of error checking. Wanting to standardize the error...
  7. T

    Assigning a Macro to a Control

    I am working with Form buttons and assigning macros to the buttons. When I first create a button, I can easily assign a macro by selecting Assign Macro from the shortcut menu. If I want to change the macro assigned to a button, or assign it after I have renamed the button, I cannot for the life...
  8. S

    VBA Userform - Edit Row

    I currently have an Excel sheet with MultiPage userform to add data onto a worksheet. Data has to ability to fill up to 122 columns. I want to make it so that the sheet cannot be edited directly, I want it to be an "Edit Row" button - so the user can click in any (populated) cell in a row...
  9. I

    Command button to create a new sheet

    Hi All, Is it possible to have a command button on a sheet which when pressed creates a copy of the sheet and puts it at the end off all the existing sheets but also has the command button on it, so when I've finished filling in the new sheet I can keep creating new sheets? Thanks
  10. J

    Best Practices When Coding Multiple Buttons Performing Similar Actions

    Wowza, Wasn’t sure what was the best way to word my question. I’m currently working on a code that transfers dates from an excel sheet into a webform and selects a specific export button on the website (just pulling reports essentially). Each button pulls a specific report. So there’s a need...
  11. M

    button to delete row and update another row

    Hello, I want if it contains a predefined value in a cell, to delete that row but not before to add the value that it has to the upper one, example below: A B C 1 apples 30 2 orange 105 3 test 5 4 carrot 40 5 test 10...
  12. J

    How To Use Variables Across Multiple Sub Routines (VBA)

    I was wondering if there was anyway to carry variables across multiple sub routines. What I want to do is set a macro to a button, and I want to use an integer to make small changes to the main sub routine. I know I can accomplish this by making the button change a cell in excel, then making...
  13. W

    F2 moving cells with mouse

    I'm at a bit of a loss here. On every version of excel I've ever used (currently 2016) when you disable "Allow Editing Directly within Cell" you can then press F2 where the cells used in the formula will be highlighted by various colors and with the left mouse button you could move the...
  14. 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...
  15. 8

    cell color change with a button click

    My intention is to color fill a specific cell (e.g. A1) with a click of a button (Button1) I've created. Another click of a button would un-fill the color. Another question that is not a priority is to open a "new comment" box for a specific cell for user to start entering in their comment with...
  16. L

    writing vba code in sheet1 instead of module

    Hi I opened bran new excel file then went to vba editor. I see Sheet1(sheet1) and Thisworkbook, inside Project windows. I double clicked sheet1 and started typing this code: Sub abc() MsgBox "hello" End Sub Then I went to excel and inserted Button and assign it to that macro and I ran it...
  17. A

    Code for Search Button in Userform

    I have an excel of total 27 columns, I want to display the data of that excel in a user form. Now I want to add a search button in the form which works in such a way that when I enter any number in H Column (already mentioned in the excel table of the H Column) and press the search button it...
  18. L

    How to move the cursor out of the comment box?

    Hello, I am developing a few macros dealing with comments. I notice that if a user happens to place (or accidentally leaves) his mouse cursor inside a comment box (e.g. after editing a comment), and then clicks on any macro button, the button does not work. He should first move his cursor out...
  19. R

    Stopping code from inside a userform??

    My code calls a userform within which I placed a "Cancel" button intended to stop all code. However, I can't figure out how to make that cancel button actually stop the code. I tried a global boolean but despite being set true in the userform form, it stayed set as false in the code that...

Some videos you may like

This Week's Hot Topics