Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default .OnAction - Multiple Calls

Hi

I am using .OnAction in floating menubar and I want to know can you have
the .OnAction call more then one subroutine?

Example
With Format
.Caption ="Fomat a Sheet"
.OnAction ="Format"
End With

I want to do something like below - that way since everything runs off this
menubar I can keep the code more compact by putting in calls to Unlock
and Lock before and after I do something to a sheet such as my format example
I have tried a few different ways and have been unsuccessfull

Example
With Format
.Caption ="Fomat a Sheet"
.OnAction ="UnlockSht" "Format" "LockSht"
End With
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default .OnAction - Multiple Calls

Hi Matt,

Those calls should go inside your Format procedure, not in the OnAction
property, e.g.:

Sub Format()
UnlockSht
''' The rest of your Format procedure code here.
LockSht
End Sub

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"Matt" wrote in message
om...
Hi

I am using .OnAction in floating menubar and I want to know can you have
the .OnAction call more then one subroutine?

Example
With Format
.Caption ="Fomat a Sheet"
.OnAction ="Format"
End With

I want to do something like below - that way since everything runs off

this
menubar I can keep the code more compact by putting in calls to Unlock
and Lock before and after I do something to a sheet such as my format

example
I have tried a few different ways and have been unsuccessfull

Example
With Format
.Caption ="Fomat a Sheet"
.OnAction ="UnlockSht" "Format" "LockSht"
End With



Reply
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
Macro - onAction arguments version83 Excel Worksheet Functions 2 April 10th 10 09:59 PM
Passing several parameters to OnAction property. LABKHAND Excel Discussion (Misc queries) 1 April 24th 09 08:02 PM
OnAction of Menu Bar with variable parameters chris Excel Discussion (Misc queries) 1 August 7th 06 04:03 PM
Timing problem with OnAction! Fred Russell Charts and Charting in Excel 3 October 18th 05 06:11 PM
OnAction Richard Yang Excel Programming 1 July 15th 03 01:37 PM


All times are GMT +1. The time now is 02:04 AM.

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

About Us

"It's about Microsoft Excel"