Hello - Disable Insert Sheet function - NOT Working... is this the correct code?
Please Login or Register to view this content.
John
Hello - Disable Insert Sheet function - NOT Working... is this the correct code?
Please Login or Register to view this content.
John
Hi, John,
if you placed the code in ThisWorkbook code should work as you expect - if you use 2007 or later you would need to find different commands as CommandBars("Ply") will not create an error but commandbar should not be visible as this commandbar turned into ribbon control. For that purpose maybe have a look at How to disable Right Click Delete Sheet Command in Excel 2010 using VBA.
Ciao,
Holger
Use Code-Tags for showing your code: [code] Your Code here [/code]
Please mark your question Solved if there has been offered a solution that works fine for you
The first question is the code above written correctly and second - I am using Excel 2013 - will this work for that version?
Hi, John,
except for the last code line the code worked for me with Excel2013 and Win8.1 in the named place, and I think I explained why the last line would not work as well.
Ciao,
Holger
I really thank you for the feedback... I placed this code minus the line of code you mention and it does not work - I placed the code in the sheet1 of the workbook - is that correct?
Hi, John,
it would really help if you read carefully what I wrote: ThisWorkbook. Event will only get fired there as an event behind an existing sheet won´t get fired when you add a new sheet (unless you use a template and copy that, and I would definitely use a different command for that - the event used is part of the Workbook and not any Worksheet).
Ciao,
Holger
Last edited by HaHoBe; 11-03-2014 at 12:54 AM.
HaHoBe,
I want again to thank you for your Guidance... The old saying step away and relook at it is what I did... Went online and looked at ThisWorkbook and realized that it was right in front of me the whole time in the Explorer pane - really sorry to frustrate you...
It works perfect as you indicted - again thanks and sorry to frustrate!
John
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks