Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Forms / October 2004

Tip: Looking for answers? Try searching our database.

commandbutton click event not trigering

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michel - 04 Oct 2004 17:03 GMT
I have a commandbutton on the Read page and coded a
simple msgbox in the click event and nothing happens.

sub commandbutton1()
Sue Mosher [MVP-Outlook] - 04 Oct 2004 17:34 GMT
Did you publish the form? Where? What's the state of the "Send form
definition..." box on the (Properties) page?

Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

>I have a commandbutton on the Read page and coded a
> simple msgbox in the click event and nothing happens.
>
> sub commandbutton1()
Michel - 04 Oct 2004 18:08 GMT
Sorry, the message was posted before i finished typing it.

here is the sample code:
Function CommandButton1_Click()
   Msgbox "Test"
End Function

The form is published in Personal Form Library for
testing purpose and sent to myself and the send form
definition with item is selected.

>-----Original Message-----
>Did you publish the form? Where? What's the state of the "Send form
[quoted text clipped - 6 lines]
>
>.
Sue Mosher [MVP-Outlook] - 04 Oct 2004 18:53 GMT
That's the problem. Code doesn't run on one-off forms. Clear the "Send form
definition ..." box and republish.

Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Sorry, the message was posted before i finished typing it.
>
[quoted text clipped - 11 lines]
> the "Send form
>>definition..." box on the (Properties) page?

>>"Michel" <anonymous@discussions.microsoft.com> wrote in
> message
[quoted text clipped - 5 lines]
>>
>>.
Michel - 04 Oct 2004 18:54 GMT
I tried removing the send form definition, republished
the form and sent it to myself and the code is still not
executed.

>-----Original Message-----
>That's the problem. Code doesn't run on one-off forms. Clear the "Send form
[quoted text clipped - 27 lines]
>
>.
Sue Mosher [MVP-Outlook] - 29 Oct 2004 14:45 GMT
Are you sure that you're sending the new version? If you incremented the
version number (which you should always do), you'll be able to check on the
Help | About This Form dialog?

Also, a Click event handler should be a Sub not a Function. Did you
double-check that the control name matches the procedure name?
Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

>I tried removing the send form definition, republished
> the form and sent it to myself and the code is still not
[quoted text clipped - 32 lines]
>>>>>
>>>>> sub commandbutton1()
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.