Send" on the Menu Bar, excel,office,vba,consulting" /> Send" on the Menu Bar Excel Questions" /> Disable "File --> Send" on the Menu Bar - MrExcel Message Board
MrExcel Message Board

Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Feb 28th, 2002, 07:42 AM   #1
trellacj
New Member
 
Join Date: Feb 2002
Posts: 7
Default

For any given file, when it is open, how do I disable the "Send" option in "File" on the Menu bar? Possibly, in code on the "Open" event? I can't figure it out.

[ This Message was edited by: trellacj on 2002-02-28 10:01 ]

[ This Message was edited by: trellacj on 2002-02-28 10:02 ]
trellacj is offline   Reply With Quote
Old Mar 3rd, 2002, 05:36 PM   #2
Guest
 
Posts: n/a
Default

trellacj,

Place the following code into the "Thisworkbook" object:

Private Sub Workbook_Open()
Application.CommandBars("Worksheet Menu Bar").Controls("File").Controls("Send To").Enabled = False
End Sub

and to restore:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Save
Application.CommandBars("Worksheet Menu Bar").Controls("File").Controls("Send To").Enabled = True
End Sub

Whenever the workbook is opened, it disables (grays out) the "Send To" option from the "File" Menu, and when closed, restores it. If you want to remove the command completely, just replace .Enabled with .Visible in both procedures. Hope it helps.

Aloha!

p.s. don't remove the workbook.save line on before close event; if you do, the user can defeat your code by making changes to the workbook, closing, then selecting "cancel "when asked to save changes--(the before close event will fire and restore the menu command if this occurs).
  Reply With Quote
Old Mar 3rd, 2002, 05:41 PM   #3
]-[ /-\ \/\/ /-\ | | /-\
New Member
 
Join Date: Feb 2002
Location: ]-[ /-\ \/\/ /-\ | | ~~~@|_()]-[/-\!!!
Posts: 48
Default

p.p.s.
Dear Mr. Excel,

I really love the new message board. The old one was already great, and this one tops the old one! I just wanted to let you know that this is the second time that I logged in and somehow got logged out (posted as anonymous). Yes, I logged in both times with the checkbox "Keep me logged in" checked. Just letting you know. Mahalo!
]-[ /-\ \/\/ /-\ | | /-\ is offline   Reply With Quote
Old Apr 2nd, 2009, 05:54 AM   #4
Katie.L
Board Regular
 
Katie.L's Avatar
 
Join Date: Sep 2008
Location: Jersey, Channel Islands
Posts: 163
Default Re: Disable "File --> Send" on the Menu Bar

Quote:
Originally Posted by ;4386
trellacj,

Place the following code into the "Thisworkbook" object:

Private Sub Workbook_Open()
Application.CommandBars("Worksheet Menu Bar").Controls("File").Controls("Send To").Enabled = False
End Sub

and to restore:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Save
Application.CommandBars("Worksheet Menu Bar").Controls("File").Controls("Send To").Enabled = True
End Sub

Whenever the workbook is opened, it disables (grays out) the "Send To" option from the "File" Menu, and when closed, restores it. If you want to remove the command completely, just replace .Enabled with .Visible in both procedures. Hope it helps.
Hello, I was looking at this code and it seems to do what I want perfectly...although if the user was to show the "Reviewing" toolbar, the option to send mail is still enabled and visible. Is there a way to "grey this out" as well.

P.S. I do not want this to have permanent effect's on people's machines. Only whilst they are using my workbook.

Any help is appreciated,

Thanks in advance
__________________
Regards,
Katie

Don't look where you fell, but where you slipped.
Katie.L is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 11:24 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes