Running my subroutine 
Author Message
 Running my subroutine

Hello,

I created a subroutine using Outlook in VBA.  It runs in the VBA
environment, but I can't get it connected to a button.  I tried adding a
macro button. using the path, view->toolbars->customize->macro (drag
Project1.ThisOutlookSession.Mytask1() onto the menubar) The button shows the
subroutine name, (Project1 etc.)  but won't run -- nothing happens when I
click it.  I created a new button using the path, view -> toolbars -> new
menu, (drag a couple of new menus onto the toolbar) but can't figure out how
to tell the button what subrutine or function to use.
Any ideas?

thanks

keith



Sat, 14 May 2005 20:42:41 GMT  
 Running my subroutine
Dragging the macro from the Commands list was the correct procedure. If it isn't running, try checking the VBA macro security settings, then restarting Outlook.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
     Microsoft Outlook Programming: Jumpstart
     for Administrators, Power Users, and Developers
     http://www.slipstick.com/books/jumpstart.htm
Quote:

> Hello,

> I created a subroutine using Outlook in VBA.  It runs in the VBA
> environment, but I can't get it connected to a button.  I tried adding a
> macro button. using the path, view->toolbars->customize->macro (drag
> Project1.ThisOutlookSession.Mytask1() onto the menubar) The button shows the
> subroutine name, (Project1 etc.)  but won't run -- nothing happens when I
> click it.  I created a new button using the path, view -> toolbars -> new
> menu, (drag a couple of new menus onto the toolbar) but can't figure out how
> to tell the button what subrutine or function to use.
> Any ideas?

> thanks

> keith



Sun, 15 May 2005 00:08:29 GMT  
 Running my subroutine
Hi Sue,

Thanks very much. I'll give that a try.

keith



Dragging the macro from the Commands list was the correct procedure. If it
isn't running, try checking the VBA macro security settings, then restarting
Outlook.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
     Microsoft Outlook Programming: Jumpstart
     for Administrators, Power Users, and Developers
     http://www.slipstick.com/books/jumpstart.htm


Quote:
> Hello,

> I created a subroutine using Outlook in VBA.  It runs in the VBA
> environment, but I can't get it connected to a button.  I tried adding a
> macro button. using the path, view->toolbars->customize->macro (drag
> Project1.ThisOutlookSession.Mytask1() onto the menubar) The button shows
the
> subroutine name, (Project1 etc.)  but won't run -- nothing happens when I
> click it.  I created a new button using the path, view -> toolbars -> new
> menu, (drag a couple of new menus onto the toolbar) but can't figure out
how
> to tell the button what subrutine or function to use.
> Any ideas?

> thanks

> keith



Sun, 15 May 2005 01:33:46 GMT  
 Running my subroutine
Hi Sue,
I got the sub to run on the button that was dragged from the macro commands
list, but not the one that was created using view -> toolbars -> new ->
menu.  Should I be able to make a connection this way?

Keith



Dragging the macro from the Commands list was the correct procedure. If it
isn't running, try checking the VBA macro security settings, then restarting
Outlook.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
     Microsoft Outlook Programming: Jumpstart
     for Administrators, Power Users, and Developers
     http://www.slipstick.com/books/jumpstart.htm


Quote:
> Hello,

> I created a subroutine using Outlook in VBA.  It runs in the VBA
> environment, but I can't get it connected to a button.  I tried adding a
> macro button. using the path, view->toolbars->customize->macro (drag
> Project1.ThisOutlookSession.Mytask1() onto the menubar) The button shows
the
> subroutine name, (Project1 etc.)  but won't run -- nothing happens when I
> click it.  I created a new button using the path, view -> toolbars -> new
> menu, (drag a couple of new menus onto the toolbar) but can't figure out
how
> to tell the button what subrutine or function to use.
> Any ideas?

> thanks

> keith



Sun, 15 May 2005 02:10:47 GMT  
 Running my subroutine
No. You should use the Macros list in the Commands dialog.
Quote:

> Hi Sue,
> I got the sub to run on the button that was dragged from the macro commands
> list, but not the one that was created using view -> toolbars -> new ->
> menu.  Should I be able to make a connection this way?

> Keith



> Dragging the macro from the Commands list was the correct procedure. If it
> isn't running, try checking the VBA macro security settings, then restarting
> Outlook.



> > Hello,

> > I created a subroutine using Outlook in VBA.  It runs in the VBA
> > environment, but I can't get it connected to a button.  I tried adding a
> > macro button. using the path, view->toolbars->customize->macro (drag
> > Project1.ThisOutlookSession.Mytask1() onto the menubar) The button shows
> the
> > subroutine name, (Project1 etc.)  but won't run -- nothing happens when I
> > click it.  I created a new button using the path, view -> toolbars -> new
> > menu, (drag a couple of new menus onto the toolbar) but can't figure out
> how
> > to tell the button what subrutine or function to use.
> > Any ideas?

> > thanks

> > keith



Sun, 15 May 2005 02:36:51 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Client-side Subroutine calling Server-Side Subroutine

2. Help! converting QB45 subroutine to VB6 subroutine

3. Subroutine in one DLL calling another subroutine

4. Run Access 97 Automation Subroutines from Excel?

5. Subroutines

6. Subroutine

7. Calling a subroutine using a function

8. Count How Many Times I call a Subroutine

9. Subform needs to call VB subroutine in main form

10. SubRoutine Parameters

11. Call a subroutine or function from an event

12. VB Subroutine To Print Form Modules

 

 
Powered by phpBB® Forum Software