Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Does anyone know if there is a way to add items to a submenu in VBA. I
have a VBA program that manipulates data for creating data sets to be analyzed in SAS and a neural network package. The data processing commands for adding lags to the data set, splitting the data set into training and verification data sets and importing the results predicted by SAS and the neural network are currently in a custom menu that I added. As these commands are essentially data commands I am shifting them to the Data menu that already exists in Excel. Adding the commands to the bottom of the Data menu is a no-brainer; I even figured out how to add a divider bar. The thing is that two of my custom commands are import functions and it makes more sense to add these two commands to the Data Import External Data submenu. VBA help provides no information for doing this. I also tried the common sense approach: ..Menus("Data")[color=blue:b69d32f640].MenuItems[/color:b69d32f640]("Import External Data")[color=blue:b69d32f640].Add[/color:b69d32f640] _ [color=blue:b69d32f640]Caption[/color:b69d32f640]:="Import SAS® Predictions...", _ [color=blue:b69d32f640]OnAction[/color:b69d32f640]:="ReadSASDataSet" The VBA compiler sees no problem with this code, but when it is executed the addition of a specific menu item caused the program to halt with an unsupported property or method error. Any assistance that can be provided would be greatly appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sub-menus of main menus for Excel 2007 | New Users to Excel | |||
difference between word 2003 menus and word 2007 menus-Explain pl | Excel Discussion (Misc queries) | |||
New Menus - attaching but menus are reset | Excel Worksheet Functions | |||
Managing User Changes | Excel Programming | |||
Overriding Actions of Excel DropDown Menus and Poup Menus | Excel Programming |