Consulting

Results 1 to 2 of 2

Thread: Detect a click outside the form in my Outlook app

  1. #1
    VBAX Newbie
    Joined
    Jun 2021
    Posts
    2
    Location

    Detect a click outside the form in my Outlook app

    Hello,


    I try to facilitate the crossing of information on Outlook.


    To do this, I retrieve the item selected in Outlook (an email, an event in the calendar, etc.) with the code below, then I display in a UserForm information related to my selection.

    Set myOlSel = Application.ActiveExplorer.Selection 
    For X = 1  To myOlSel.Count
            ElementSelectionne = EvenementSelectionne & myOlSel.Item(X).Subject
     Next 
    TextBox_ElementSelectionne.Value = ElementSelectionne
    What I would like is to set the ShowModal parameter of my UserForm to False and detect a MouseUp or the change of selection in my Outlook application so that the information in my UserForm updates itself based on what I have selected with the mouse.
    The idea is not to have an update button in my UserForm so that the use is more fluid.


    I hope I was clear in my explanations and thank you in advance for your help.


    Pirrok.

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,704
    Location
    I don't know about Outlook, but in excel, I would have to use a WithEvents Class. I hope that helps a bit.
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Posting Permissions

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