ScoobyNet.com - Subaru Enthusiast Forum

ScoobyNet.com - Subaru Enthusiast Forum (https://www.scoobynet.com/)
-   Computer & Technology Related (https://www.scoobynet.com/computer-and-technology-related-34/)
-   -   VBA problem... command doesn't appear to work (https://www.scoobynet.com/computer-and-technology-related-34/235682-vba-problem-command-doesnt-appear-to-work.html)

Mick 31 July 2003 12:38 PM

I have enjoyed making a little calendar function for Excel as demonstrated at : http://www.fontstuff.com/vba/vbatut07.htm

Getting adventurous I continued the tutorial getting to add the command to the in-cell shortcut menu at Excel opening.

Unfortunately I have now 5 copies of the cmmand on my menu due to not being able to get the delete part of the command working - either in the 'Before Workbook close' function or in the 'Immediate Window'

The text from the webpage is as follows:
enter the line:

Application.CommandBars("Cell").Controls("Insert Date").Delete

...which removes your item from the shortcut menu of a cell. Your finished code should look like this:

*Picture*

TIP: If you should find yourself with unwanted copies of custom menu items on the shortcut menu (because, like me, you wanted to test the first procedure before you created the second one!). You can give the instruction from the Visual Basic Editor's Immediate Window (go to View > Immediate Window or Keys: CTRL+G). Click in the Immediate Window and type the line the starting Application... and ending ...Delete then press [ENTER].

The line refered to above... should it start 'the starting Application...' or just 'Application...' ????

Cheers

Mick


All times are GMT +1. The time now is 12:58 PM.


© 2024 MH Sub I, LLC dba Internet Brands