Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default .Parameter property of CommandBarButton

Hello,

Running Excel 2000 I dynamically create a command bar button but cannot
seem to make its .Parameter property work.

Set myCBB = CommandBars("Standard").Add (etc...)

with myCBB
.Parameter = "Macro ""<Module_Name.<Sub_Name"""
end with

I run this code and then click the button and the "Assign Macro" dialog
box appears. Please help!

-Greg


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default .Parameter property of CommandBarButton

Hi Greg

Sounds like you want the .OnAction property, not the .Parameter.

with myCBB
.OnAction = Module_Name.Sub_Name
end with

HTH. Best wishes Harald

"Gregory Kip" skrev i melding
...
Hello,

Running Excel 2000 I dynamically create a command bar button but cannot
seem to make its .Parameter property work.

Set myCBB = CommandBars("Standard").Add (etc...)

with myCBB
.Parameter = "Macro ""<Module_Name.<Sub_Name"""
end with

I run this code and then click the button and the "Assign Macro" dialog
box appears. Please help!

-Greg




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default .Parameter property of CommandBarButton

Tried it and it works. I am baffled, though, because I've been using
..Parameter in MSProject 2003. Maybe an update or something. Thanks again!

"Harald Staff" wrote in message
...
Hi Greg

Sounds like you want the .OnAction property, not the .Parameter.

with myCBB
.OnAction = Module_Name.Sub_Name
end with

HTH. Best wishes Harald

"Gregory Kip" skrev i melding
...
Hello,

Running Excel 2000 I dynamically create a command bar button but

cannot
seem to make its .Parameter property work.

Set myCBB = CommandBars("Standard").Add (etc...)

with myCBB
.Parameter = "Macro ""<Module_Name.<Sub_Name"""
end with

I run this code and then click the button and the "Assign Macro"

dialog
box appears. Please help!

-Greg






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
How to choose if I use a parameter or not in a parameter query Arnaud Excel Discussion (Misc queries) 0 March 8th 07 01:19 PM
trouble with commandbarbutton.state Wazooli Excel Programming 1 May 26th 05 09:18 PM
Self deleting CommandBarButton possible? Bruno G. Excel Programming 2 January 11th 05 12:13 PM
CommandBarButton click event Javi Excel Programming 0 November 3rd 03 03:05 PM
CommandBarButton.FaceId=? Tom Ogilvy Excel Programming 1 September 17th 03 05:28 PM


All times are GMT +1. The time now is 12:05 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"