change event

  1. B

    Subtract Hours from Time Using VBA Change Event

    Hi Community - it's been a while since I did this, and I can't remember for the life of me how to add / subtract hours from time. Here is a draft of the VBA code I have to perform expression: Private Sub Worksheet_Change(ByVal Target As Range) If Target = Range("D6") Then Target.Value =...
  2. Q

    Creating Change Events on Dynamically Created Textboxes

    Hello all, I hope this finds you all healthy and safe! I have a Userform where I have populated some textboxes in Design and others dynamically. For the textboxes that I have created dynamically, I need to populate the Change event with code to run a routine in a module. I'm creating the...
  3. szita2000

    Worksheet Change event / Calculate cells changed by formulas

    Hi guys. I am struggling with this one. So far I had this code to test my color changing shapes. I created a small table with Shape name, Value, Target Value It was working whenever I manually typed over the value. But now I have to change the code so the value triggers the macro coming...
  4. ClimoC

    Single Class and EventHandler for multiple Control types in Userform?

    Howdy gang Trying to do a shortcut - Userform is having dynamic number of items created at runtime for the user to interact with. I've done this successfully with Checkboxes, and that's all fine - but I was as I'm adding a lot of textboxes and comboboxes, and they all need an event fired on...
  5. J

    Is there a change event type that works on specific rows or ranges instead of on an entire worksheet?

    I have a worksheet change event in development that is already large enough it visibly slows my system down. The change event iterates through about 500 rows of data based on the user entries. I am using the change event to guide the user in what entries are valid vs. invalid with colorcoding...
  6. H

    Change Event - Hide Range

    Hi all, I have the following VBA code that I am having issues with, ive pieced it together from various sources but it doesn't quite work as it should... Private Sub Worksheet_Change(ByVal Target As Range) Application.ScreenUpdating = False If Not Intersect(Range("H6"), Target) Is Nothing...
  7. H

    Converting VBA code from a Button to a Change Event

    Hi all, I have some code attributed to a button currently and I want to change it so that it runs automatically based on the value of a cell. I believe it needs to be a change event? But I cant seem to get it to work. Below is the code that I currently have running off a button. Sub...
  8. N

    VBA Subtraction formula on change event

    I am very new to vba but I am stuck trying to get a subtraction when a cell is entered. For example I want in column A to do =B10-G10 but I want this on any row not specific to row 10 This is mainly to count how many days between 2 dates but it will change based on when Column G or B is changed...
  9. D

    VBA Userform Help Required - Stuck

    Hi, Is there a way to call the sub attached to a datepicker_change() each time the value is changed after userform initialization? Below is the event code, what i have found is that if the user selects the wrong date initally and an existing record is found which returns values into the...
  10. L

    Pivot Table Update Change event

    Hello - I have a pivot table change event that runs on pivot table update. This process works great, provided the changes occur on the sheets that the pivot tables reside. However since we have multiple sheets with multiple pivots my users wanted a "workbook control sheet" added that contains a...
  11. X

    VBA Worksheet Change Event is firing unexpectedly

    Hello everyone, I am looking for help with a VBA Worksheet Change Event. The following code worked flawlessly until I attempted to insert a row at row 21. It is designed to activate code to display other sheets that are related to the process that is selected when the dropdown is changed in...
  12. M

    Excel VBA Worksheet Calculate running slowly

    Hello all, My question pertains to the Worksheet_Calculate VBA sub. I have the code below that I wish to execute every time a cell is "confirmed" within the worksheet. Basically, I have the table range that spans columns A:I, with various field headers. Column A has numbers that either...
  13. P

    Worksheet change event_event on based on null value

    Hi, I have the following 4 columns in an excel file. In column Status I have different drop down values like Completed pending, to review etc. Now my problem is if final review issued date is blank, then user shouldn't be able to select the status "Completed" from drop down in status column...
  14. M

    Combining multiple Worksheet change events

    Hello guys and gals, I'm a rookie to VBA and currently trying to combine two separate worksheet changes to my excel sheet. Both work individually, but i haven't found a way to combine them to run. I want them to change certain cells to N/A, dependent on the data in other cells. I know the codes...
  15. M

    Time stamp adjacent cell when formula changes given cell in range

    Hi all, Long time viewer, first time poster, haha. I can't even begin to say how much the posts here have helped me out at work. What I'm trying to accomplish is that when the value of a cell in column C changes, the cell adjacent to the changed cell is time-stamped with the time of the change...
  16. M

    better control of a change event

    Hello, I am working on a macro and I have it doing everything I want it to do except one thing. When a change event happens, it continues the loop to the last cell on the worksheet. I am trying to make a calculation happen and the field change color when a a cell is changed, which it does...
  17. Z

    Change Event of Textbox Was Not Firing on Second Userform

    I created 2 userforms. Each userform has a text box. When the last letter of textbox is “E", close current userform, and open another one. However, when second userform is loaded, the change event was not working. Can anybody tell me why or how to fix it? Thanks in advance. Code for...
  18. A

    Cannot get 2 worksheet change macros combined?

    Hello for the life of me I cannot get these 2 worksheet change events combined. Below is the code of me just pasting one after the other in the same sub. They work seperately but the bottom one doesnt work when they're combined. Thank you. Private Sub Worksheet_Change(ByVal TARGET As Range)...
  19. J

    Event Handler for Dynamically Created Combobox

    Hi All, I have a combobox named bfPoject2 that is created programmatically as follows: Set bfProject2 = Controls.Add("Forms.ComboBox.1", bfProject2) With bfProject2 .Top = 195 .Left = 474 .Width = 180 .List = Range(Cells(2, 4), Cells(lastRowProj, 4)).Value...
  20. M

    Linking TWO different Pivot Table Filters to Two Cell Values

    I am attempting to have two Pivot Table Report filters (PivotTable1) update based on values of cells on another sheet ("Summary"). With the following code, it only updates on the first set of instructions - when E4 is updated, "Names" filter will change but not "Sex". Any help is appreciated...

Some videos you may like

This Week's Hot Topics

Top