LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 214
Default OnAction procedure

Hi Max,
For each item:
..OnAction = ThisWorkbook.Name & "!MyMacro"

' Example for menu (2 items / separator / 1 item)
Sub MyMacro
Select Case Application.Caller(2)
Case 1: ThisWorkbook.Save
Case 2: ActiveWindow.SelectedSheets.PrintPreview
' NewGroup then add 1
Case 4: ThisWorkbook.Close False
End Select
End Sub

Regards,
MP

"Max Potters" a écrit dans le message de
...
Hi all,

I would like to use the OnAction procedure, but I want to give an argument
to it as well... For example:

.OnAction = "module(i)"

I don't know for sure if this method works, but I guess not. Does anyone
know how to put an argument in the onaction statement?

thanks in advance

Max






 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop a Procedure from another procedure Ayo Excel Discussion (Misc queries) 1 October 30th 08 01:42 AM
Calling a procedure in a procedure Norman Jones Excel Programming 8 August 20th 04 07:53 PM
Calling a procedure in a procedure N10 Excel Programming 2 August 18th 04 12:49 AM
Calling a procedure in a procedure Don Guillett[_4_] Excel Programming 1 August 17th 04 11:31 PM


All times are GMT +1. The time now is 11:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"