Results 1 to 9 of 9

Thread: WithEvents of Excel.Application Events

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,451
    Rep Power
    10

    WithEvents of Excel.Application Events

    (This is post 2294)
    There is a summary / revision in post #6 https://excelfox.com/forum/showthrea...ll=1#post15200 This will most likely only be useful as a revision later, but might also help some who have perhaps already tackled this subject and need quickly to revise the Format of a typical solution



    WithEvents of Excel.Application

    Post #1 Introduction and Revision: How we get macros to run automatically…
    In Excel things get done. We tend to use the jargon: " "Events" occur ". Usually to do this some internal and/or high level coding is in action to do this. In VBA coding we have the option to "hang on" procedures to this coding so that we can arrange that other things are done with or at some point within these "Events" . The end effect is that we can "automate" things, that is to say some of our coding / procedures can be started automatically when something else happens/ when an event occurs.

    Post #1: Review of some relevant basic programming concepts
    It is difficult to explain this subject without reviewing some other somewhat imprecisely defined concepts…
    This Tutorial Thread, WithEvents of Excel.Application , assumes you have some initial experience and knowledge of event type code things. In other words you are familiar with things like coding procedures which start automatically when you change things in a worksheet. So you may have done some simple code like this - ...._
    Code:
    Private Sub Worksheet_Change(ByVal Target As Range)
     If Target.Address = "$A$1" Then MsgBox prompt:="You just changed the value in the first cell in worksheet " & Me.Name & " in the Workbook " & Me.Parent.Name
    End Sub
    _....
    Last edited by DocAElstein; 01-07-2021 at 02:31 PM.

Similar Threads

  1. How To Create Interactive Charts in Excel Using Chart Events
    By Transformer in forum Tips, Tricks & Downloads (No Questions)
    Replies: 2
    Last Post: 04-18-2019, 03:32 PM
  2. Replies: 1
    Last Post: 09-29-2013, 12:02 AM
  3. Replies: 4
    Last Post: 07-10-2013, 04:35 AM
  4. Replies: 1
    Last Post: 02-14-2013, 11:08 AM
  5. Excel Application.OnKey With Parameter
    By Excel Fox in forum Excel Help
    Replies: 0
    Last Post: 11-29-2011, 01:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •