Consulting

Results 1 to 2 of 2

Thread: Call a UserForm from ItemSend vbModal

  1. #1

    Call a UserForm from ItemSend vbModal

    Hi all,

    I would like to ask for some help with an Outlook 2007 Macro I have created.

    The Macro uses the ItemSend Even to modify the Subject of an email about to be sent. From within ItemSend I call a userform (ExampleForm.Show vbModal).

    So, when the user clicks on the email's send button the form appears, but while the form is opened the user can click (outside the form) on the email (Outlook.Application.ActiveInspector.CurrentItem) and make changes. This is what I try to avoid. I do not want the user to be able to click outside the form.

    I would appreciate any help with this. What I'm trying to do is when the userForm is actived, the user NOT to be able to click outside the form, similar behavior as the MSgBox.


    Thanks in advance for your help!
    Anastasios
    Last edited by Anastasios; 06-22-2014 at 12:02 PM. Reason: Make it more clear.

  2. #2
    Hi,
    I actually found the trick to work and it looks pretty simple. Just had to initialise the form with a focus to one of its buttons and did the trick:

    Private Sub UserForm_Initialize()
        Me.CommandButton1.SetFocus
    End Sub
    Last edited by Aussiebear; 11-22-2024 at 01:06 PM.

Tags for this Thread

Posting Permissions

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