1. W

    Vba help

    Good day, I am new to this and this is my first post. I have limited excel experience and to be honest have not ran a single VBA yet. They seem a little intimidating to me to say the least. I created an excel document (well call it Document 1) that has the (now) time at the top that updates...
  2. T

    Worksheet_Change / Worksheet_SelectionChange with Data Validation

    Further to my thread here: https://www.mrexcel.com/forum/excel-questions/1096576-vba-worksheet_chnage-event-bug-3.html Here is the code: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) With Application .EnableEvents = False Select...
  3. T

    VBA Worksheet_Chnage event bug

    My program has both a Worksheet_Change event and a Worksheet_SelectionChange event. For some reason, when it runs to the end of the Worksheet_Change event, it jumps to the Worksheet_SelectionChange event. Has anyone experienced this before?
  4. C

    Adding data to a Webpage

    Hello, I am trying to add data into a webpage , with vba. I can pass the values correctly but they are not saved the following code passes the values correctly : Dim desc as string, nLinha as integer desc =" first of 4 invoice lines to be added" for nLinha= 0 to 3...
  5. K

    Allow a macro to run, even if the PC is locked

    i have a rather long routine that I would like to fire off during my lunch break. I will have the work book open, and I have added the necissary code to the workbook_open event Application.OnTime TimeValue("13:00:00"), "AFK UPDATE" However my PC is set to lock after a few minutes due to group...
  6. M

    Calculate events for current month in real time based on conditions

    Hi There!! I've been wracking my brain and I can't seem to get it to work. Basically I'm trying to create a tracker that will display how many different events per region are happening in the current month (month when the file is opened by others). Each cell will target a different region and...
  7. K

    Trigger VBA on double click

    Couple of questions. I want to apply an advanced filter based on the cell that is double clicked. This works Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Global_Filter End Sub I have a few questions 1. The Sheets "Data" is deleted and recreated as...
  8. E

    VBA Prevent User from leaving Worksheet (Worksheet_Deactivate)

    I would like to prevent the user from leaving Sheet1 if certain conditions are not met. I'm using the Worksheet_Deactivate event in the Sheet1 module. However, when the user attempts to leave Sheet1 by selecting Sheet2, the Sheet2 Worksheet_Activate event runs even though I have...
  9. B

    Data Validation Event

    Hello. I am new to Excel VBA and am making progress but am having a tough time with getting a VBA event to trigger when selecting different Cases in a dropdown Below is some simple code I have written just to find a way to get the code right. I have a drop down field (AE48) and the validated...
  10. A

    UserForm Initialise

    I'm attempting to Load a UserForm from a Worksheet Double Click I also want to pass a worksheet Range to the Form so using: Public Property Let Dat (inVal as Range) Set MyRow= inVal End Property When this is called from the worksheet BeforeDoubleClick myForm.Dat = Me.Range("A" & Target.Row &...
  11. T

    Row deactivate event

    Is there a rows deactivate event? When my users insert a row, I want to prevent them from moving to another row until the cell in the column A of the newly inserted contains a value. Thanks
  12. K

    Copying every 5th column cell into a list

    Hi I have a multiple sheet workbook - one of the worksheets has a series of event headers that run across 5 merged cells ("event1"= D2:H2, "event2"= I2:M2, "event3"= N2:R2 etc) I have a summary sheet that pulls statistics from the entire workbook and I would like to have a summary of the event...
  13. D

    Anyway to have BeforSave event runs after SaveAs location prompt instead of before?

    So I have some code that I don't want to run until after the user selects save on the SaveAs save location prompt but it appears the BeforeSave event runs the code before the prompt even opens. Is there anyway around this or some other method to define a trigger event for once the user selects...
  14. Z

    Collecting Row location based on multiple Worksheet Change Event

    Hello all, Here is my situation, I'm currently using worksheet_change event for Column F. I have set the target to Column F Set R = Intersect(Target, Range("F:F")) This run one set of coding for the event when something happens in column F. Now i want to run code that counts the filled...
  15. S

    Message box is repeating with multiple worksheet changes

    I have multiple worksheet event macros on my sheet. When selection Y/N is unlocks or locks respectively and a message box appears based on the selection. For some reason my macros 3-6 repeat the previous message boxes starting with the message box in the 2nd macro. The first and second macros...
  16. Caleeco

    Call Module Subroutine from SelectionChange Event

    Hello, I'm having a code structure issue, so the code below is just representative of the problem. I have several sheets which I would like to have a SelectionChange Event trigger some code to run. There is one routine that I have that needs to run regardless of which SelectionChange event...
  17. A

    After Update event doesn't work

    Private Sub cmdPrimary_Click() txtPrimary.text = GetFolder("Select the Primary Folder") End Sub Private Sub txtPrimary_AfterUpdate() Stop End Sub The GetFolder function returns a value which txtPrimary displays. It isn't assigned a value until then but the After Update event doesn't fire...
  18. L

    Worksheet_SelectionChange won't work with Protected Sheet

    The event is triggered just fine when the worksheet is not protected. When I protect it, however, this event is no longer being triggered. Nothing else has changed. Is this how Excel is supposed to work? Not sure if I'm missing something here...
  19. V

    XRL Report - Calculations switch off

    Hello all This is a bit of a strange request I update a report with an add on tool in Excel called "XRL" When the report is updated "XRL" has switched the calculations function off. I thought of trying a worksheet event change to switch the calculations back on but this is not working unless...
  20. M

    Worksheet change event

    I have a basic worksheet change event, where on the one worksheet, cell changes values (case is), rows are hidden, or unhidden. I'm not fluent/skilled enough, is there a way that when there is a change to a value in a cell in sheet1 (let's say "Show me" and "Where did it go"), that it triggers...

Some videos you may like

This Week's Hot Topics