[RESOLVED] Outlook Programming Simple help required
Hey,
OK a really basic question but one which has had me baffled all morning.
I have created an Outlook Task Form.
Now all I want to happen is display a message box from VBA either when the form loads or when the Form is sent.
I just cannot get the VBA code to run.
I have currently put the code in the project ThisOutlookSession. Am I missing something simple do I need to somewhere wire the VBA up to the form?
Code:
Private Sub Application_ItemLoad(ByVal Item As Object)
MsgBox "item load"
End Sub
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
MsgBox "item send"
End Sub
Or on an even simpler example if I put a button on a form where is its onlick event as there appears to be no property for this?
I have a commandbutton1 on the form, then within module 1 I have the code
Quote:
Sub CommandButton1_Click()
MsgBox "button click"
End Sub
but still when the form is run and the button is clicked nothing happens.
Re: Outlook Programming Simple help required
Quote:
I have a commandbutton1 on the form, then within module 1 I have the code
the command button click event must on the form codepage, not in a module
ideally select the event from the dropdown boxes at the top of the userform codepage
Quote:
I have currently put the code in the project ThisOutlookSession.
i don't have outlook, but try right clicking on the commandbutton, see if there is assign macro or other similar option
Re: Outlook Programming Simple help required
the formcode page doesnt appear in the project and there doesnt appear to be any assign macro option when right clicking the button.
Re: [RESOLVED] Outlook Programming Simple help required
OK om using the script editor now instead of the VBA which is working fine, not a very nice dev environment though.