withevents

  1. bobsan42

    WithEvents Form AccessObject ... conundrum

    Hello all. My goal at the moment is: To open Form1 as background, make it translucent, then use the openArgs to pass a name to open Form2 on top of it. When Form2 is closed Form1 to close automatically. I achieved it easily with DoCmd.OpenForm but then I have to set WindowMode:=acDialog, which...
  2. A

    Change Event for Multiple Check Boxes

    I have 25 text boxes named in the following manner on a UserForm Name: id_[X]_box 1<= x <= 25 I am trying to write a program which can register a change event for all 25 boxes and populate the corresponding [DESCRIPTION] Labels. Naming scheme for Description Labels Name: desc_[X]_label 1 <= X...
  3. 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...
  4. T

    WithEvents for a Shape

    I am trying to find an event for a shape but this does not work: Public WithEvents ShapesEvent As Shapes because VBA doesn't recognise Shapes. What should I declare it as? Thanks
  5. L

    Help with Outlook VBA

    I know this is not directly Excel related, but I don't know if MR OUTLOOK exists, and the issue is related to trying to open a worksheet as a result of a certain email being delivered. I previously had code in ThisOutlookSession that would mark deleted items read when they were added to the...
  6. Tim_Excel_

    Workbook_SheetChange event loses reference to Workbook

    Hi forum, I have a Workbook_SheetChange event for another workbook (other than the workbook that holds the code). At the end of a lengthy Sub, I call for the Sub that defines the Workbook's name that the event needs to work for: Sub step1() '''''code'''' NameGrabber.DefineWorkbookName End...
  7. V

    Using group email as default sender address for Reply , Forward and New Email

    I have a problem with my macro for outlook. I've created VBA as below to change default sender email address in Reply , Forward and New Email. I want to use group email as default sender address for all outgoing email. But it can work fine only for New Email. It does not work in Reply and...
  8. Jaafar Tribak

    Prevent renaming worksheets without locking the workbook structure

    Hi, I have seen this question asked before and the usual workaround is to restore the worksheet name after the sheet has been renamed.. This is often done in the Worksheet Selection Change or deactivate events as follows : Private Sub worksheet_SelectionChange(ByVal Target As Excel.Range)...
  9. P

    Convert VB code to VBA

    Morning folks (At least it is where I am). Hoping for some guidance please. Not sure if this is the best idea or even possible, but here goes. Sorry if its a ramble and a long post, but there's information here that is beyond my meager experience and skills, but may well be perfectly clear and...
  10. Jaafar Tribak

    Nifty Class for Trapping Mouse Clicks on Cells

    Hi all, There are times when excel users need to detect when a cell is being mouse-clicked ... The worksheet Selection_Change event is often used for this purpose but it has two main problems : A- it doesn't differenciate between keyboard and mouse selections B- It doesn't work if the same cell...
  11. C

    What Triggers a Class Module to be Read?

    I've been coding in Excel VBA for a while, but am fairly new to using Class Modules. One of the classes I have created depends on another user-defined class that is defined in an add-in that only a few employees at my firm have. My issue is that whenever someone who doesn't have this add-in...
  12. Jaafar Tribak

    Sinking events of a remote workbook

    Hi all, I am not experienced with network programming so I am asking here if the following prank would work (this is just an illustrative example) Ok- Let's say a remote workbook (located in a network shared Drive/Folder) is currently opened by some user on the network and I wanted to play a...
  13. R

    VBA Collection Items Get Overwritten

    I am attempting to add form controls dynamically to a blank form, and build a collection of those controls so I can write my own events. I'm having limited success. The controls are successfully adding to the form, appear to be adding to the collection, but my click() event only works for the...
  14. Jaafar Tribak

    Challenging problem - Generic CommandButton Click Event w/o a seperate Class module !!

    Greetings all. Let me see if I can explain this clearly. Suppose I have a UserForm with 10 CommandButtons. Each CommandButton has the same code inside its _Click event handler. Now, because the Click event code for each CommandButton are the same ,we can, as you know, use a small Class...

Some videos you may like

This Week's Hot Topics

Top