LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Managing menus via VBA

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
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
Sub-menus of main menus for Excel 2007 Eleanor Peppard New Users to Excel 1 March 16th 10 04:12 PM
difference between word 2003 menus and word 2007 menus-Explain pl kali Excel Discussion (Misc queries) 1 August 29th 07 07:56 AM
New Menus - attaching but menus are reset Greegan Excel Worksheet Functions 0 November 5th 05 03:19 PM
Managing User Changes Peter[_44_] Excel Programming 1 August 9th 04 12:12 PM
Overriding Actions of Excel DropDown Menus and Poup Menus Von Shean Excel Programming 2 February 3rd 04 06:43 AM


All times are GMT +1. The time now is 06:43 AM.

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"