A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Calling a private sub in Outlook via toolbar button



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 26th 06, 09:55 PM posted to microsoft.public.outlook.program_vba
butterfly
external usenet poster
 
Posts: 1
Default Calling a private sub in Outlook via toolbar button

I need to add a button to my outlook toolbar called "send and file".
This button needs to call a subroutine that will send the message and
allow a user to choose a folder to save the message to (other than the
sent items). My subroutine is working correctly. However, I am unable
to link it to the toolbar because it is a private subroutine. How can
I trigger a private subroutine from a toolbar button?

Thanks very much for your help!

Ads
  #2  
Old June 27th 06, 05:21 AM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default Calling a private sub in Outlook via toolbar button

Am 26 Jun 2006 13:55:50 -0700 schrieb butterfly:

You canīt link it to the button. Why donīt you declare the subroutine as
public?

Another way is to use a variable as Office.CommandButton, declared
WithEvents. From that Click event you can call private methods in that
module.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


I need to add a button to my outlook toolbar called "send and file".
This button needs to call a subroutine that will send the message and
allow a user to choose a folder to save the message to (other than the
sent items). My subroutine is working correctly. However, I am unable
to link it to the toolbar because it is a private subroutine. How can
I trigger a private subroutine from a toolbar button?

Thanks very much for your help!

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
push button on outlook toolbar inserts text to email jamesd Add-ins for Outlook 0 June 23rd 06 09:44 PM
New Email Button on toolbar Angel Outlook and VBA 1 June 14th 06 04:30 PM
Create button on toolbar for form BTH Outlook - Using Forms 1 May 11th 06 12:22 PM
click a button on the toolbar (via VBA?) Dan Outlook and VBA 7 May 2nd 06 09:35 AM
Toolbar button for show gridlines? [email protected] Outlook and VBA 1 February 14th 06 06:20 AM


All times are GMT +1. The time now is 06:53 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright Đ2004-2025 Outlook Banter.
The comments are property of their posters.