Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Am trying to direct a menu call to a specific Project and
Sub. The following attempt is not working: With .Controls.Add(Type:=msoControlButton) .Caption = "&Add a Standard Page" .OnAction = "AddBofQStandardPage" End With More correctly, it is working, but is calling the sub "AddBofQStandardPage" from a module in a different Project. How do I reference the sub in, say Project1, Module1, when the the menu item is triggered, please? Regards. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.520 / Virus Database: 318 - Release Date: 18/09/2003 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
.OnAction = "MyWorkbookName.xls!AddBofQStandardPage"
Assume you don't have two procedures with that name in that workbook. If the workbook isn't open, include the path. -- Regards, Tom Ogilvy Stuart wrote in message ... Am trying to direct a menu call to a specific Project and Sub. The following attempt is not working: With .Controls.Add(Type:=msoControlButton) .Caption = "&Add a Standard Page" .OnAction = "AddBofQStandardPage" End With More correctly, it is working, but is calling the sub "AddBofQStandardPage" from a module in a different Project. How do I reference the sub in, say Project1, Module1, when the the menu item is triggered, please? Regards. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.520 / Virus Database: 318 - Release Date: 18/09/2003 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just to be sure, can one reference the module in that statement,
ie ..OnAction = "MyWorkbookName.xls! _Module1_AddBofQStandardPage" Regards. "Tom Ogilvy" wrote in message ... .OnAction = "MyWorkbookName.xls!AddBofQStandardPage" Assume you don't have two procedures with that name in that workbook. If the workbook isn't open, include the path. -- Regards, Tom Ogilvy Stuart wrote in message ... Am trying to direct a menu call to a specific Project and Sub. The following attempt is not working: With .Controls.Add(Type:=msoControlButton) .Caption = "&Add a Standard Page" .OnAction = "AddBofQStandardPage" End With More correctly, it is working, but is calling the sub "AddBofQStandardPage" from a module in a different Project. How do I reference the sub in, say Project1, Module1, when the the menu item is triggered, please? Regards. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.520 / Virus Database: 318 - Release Date: 18/09/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.521 / Virus Database: 319 - Release Date: 23/09/2003 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
..OnAction = "MyWorkbookName.xls!Module1.AddBofQStandardPag e"
-- Regards, Tom Ogilvy Stuart wrote in message ... Just to be sure, can one reference the module in that statement, ie .OnAction = "MyWorkbookName.xls! _Module1_AddBofQStandardPage" Regards. "Tom Ogilvy" wrote in message ... .OnAction = "MyWorkbookName.xls!AddBofQStandardPage" Assume you don't have two procedures with that name in that workbook. If the workbook isn't open, include the path. -- Regards, Tom Ogilvy Stuart wrote in message ... Am trying to direct a menu call to a specific Project and Sub. The following attempt is not working: With .Controls.Add(Type:=msoControlButton) .Caption = "&Add a Standard Page" .OnAction = "AddBofQStandardPage" End With More correctly, it is working, but is calling the sub "AddBofQStandardPage" from a module in a different Project. How do I reference the sub in, say Project1, Module1, when the the menu item is triggered, please? Regards. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.520 / Virus Database: 318 - Release Date: 18/09/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.521 / Virus Database: 319 - Release Date: 23/09/2003 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Most odd.
..OnAction = "BofQ Utilities.xla!Menu_Routines.AddBofQStandardPage" results in a the same named sub being called from a completely different project and module.... How can this be, please? Regards. "Tom Ogilvy" wrote in message ... .OnAction = "MyWorkbookName.xls!Module1.AddBofQStandardPag e" -- Regards, Tom Ogilvy Stuart wrote in message ... Just to be sure, can one reference the module in that statement, ie .OnAction = "MyWorkbookName.xls! _Module1_AddBofQStandardPage" Regards. "Tom Ogilvy" wrote in message ... .OnAction = "MyWorkbookName.xls!AddBofQStandardPage" Assume you don't have two procedures with that name in that workbook. If the workbook isn't open, include the path. -- Regards, Tom Ogilvy Stuart wrote in message ... Am trying to direct a menu call to a specific Project and Sub. The following attempt is not working: With .Controls.Add(Type:=msoControlButton) .Caption = "&Add a Standard Page" .OnAction = "AddBofQStandardPage" End With More correctly, it is working, but is calling the sub "AddBofQStandardPage" from a module in a different Project. How do I reference the sub in, say Project1, Module1, when the the menu item is triggered, please? Regards. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.520 / Virus Database: 318 - Release Date: 18/09/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.521 / Virus Database: 319 - Release Date: 23/09/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.521 / Virus Database: 319 - Release Date: 23/09/2003 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No offense intended, but naturally I remain incredulous.
How can this be, please? Some mistake or assumption on your part I would assume. In the macro that is running (not the one you cite), put in a line of code like msgbox commandbars.ActionControl.OnAction If it shows BofQ Utilities.xla!Menu_Routines.AddBofQStandardPage and that isn't the macro that is running, then I'm the fool. -- Regards, Tom Ogilvy Stuart wrote in message ... Most odd. .OnAction = "BofQ Utilities.xla!Menu_Routines.AddBofQStandardPage" results in a the same named sub being called from a completely different project and module.... How can this be, please? Regards. "Tom Ogilvy" wrote in message ... .OnAction = "MyWorkbookName.xls!Module1.AddBofQStandardPag e" -- Regards, Tom Ogilvy Stuart wrote in message ... Just to be sure, can one reference the module in that statement, ie .OnAction = "MyWorkbookName.xls! _Module1_AddBofQStandardPage" Regards. "Tom Ogilvy" wrote in message ... .OnAction = "MyWorkbookName.xls!AddBofQStandardPage" Assume you don't have two procedures with that name in that workbook. If the workbook isn't open, include the path. -- Regards, Tom Ogilvy Stuart wrote in message ... Am trying to direct a menu call to a specific Project and Sub. The following attempt is not working: With .Controls.Add(Type:=msoControlButton) .Caption = "&Add a Standard Page" .OnAction = "AddBofQStandardPage" End With More correctly, it is working, but is calling the sub "AddBofQStandardPage" from a module in a different Project. How do I reference the sub in, say Project1, Module1, when the the menu item is triggered, please? Regards. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.520 / Virus Database: 318 - Release Date: 18/09/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.521 / Virus Database: 319 - Release Date: 23/09/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.521 / Virus Database: 319 - Release Date: 23/09/2003 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to get send option under file menu in excel sheet | Excel Discussion (Misc queries) | |||
No Send to in File menu | New Users to Excel | |||
option explicit | Excel Discussion (Misc queries) | |||
How do I change the order of choices in menu File- Send To | Excel Worksheet Functions | |||
SEND TO menu | Excel Discussion (Misc queries) |