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 Mar 28th, 2002, 06:20 AM   #1
Daniel Cremin
Board Regular
 
Join Date: Feb 2002
Posts: 64
Default

Hi im in really really big trouble with a macro i always thought would be easy. I need to be able to apply the following to always happen to all sheets when i open a workbook in Excel:

-Have all Sheet tabs hidden
-No Row and Column Headers visible
-Have all sheet protected so that only unlocked cells can be selected.

When the system closes and opens each times it needs to be like this! Please Please Please help me
Thanks very very much

Daniel
Daniel Cremin is offline   Reply With Quote
Old Mar 28th, 2002, 08:55 AM   #2
Daniel Cremin
Board Regular
 
Join Date: Feb 2002
Posts: 64
Default

does ne one know anything that can help me with this?
Daniel Cremin is offline   Reply With Quote
Old Mar 28th, 2002, 09:12 AM   #3
Mark O'Brien
MrExcel MVP
 
Mark O'Brien's Avatar
 
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
Default


-Have all Sheet tabs hidden

I don't think this is possible. It would make the workbook ridiculous.

-No Row and Column Headers visible

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveWindow.DisplayHeadings = True
End Sub

Private Sub Workbook_Open()
ActiveWindow.DisplayHeadings = False
End Sub


-Have all sheet protected so that only unlocked cells can be selected.

No practical way to do this and I can't see the point. Why shouldn't the user be able to select locked cells if they can't change the contents?
You can protect the sheet manually, but if you need code to do this use the "search" on this website to find it.

Why do you need to do this? I used to asked for stupid crap like this from my boss when he was too cheap to purchase a GUI package. I get the feeling you're up against something similar.

HTH
__________________
Mark O'Brien

Columbus Ohio Celtic Supporters Club
Mark O'Brien is offline   Reply With Quote
Old Mar 28th, 2002, 12:12 PM   #4
Daniel Cremin
Board Regular
 
Join Date: Feb 2002
Posts: 64
Default

What i basically want is an auto_open macro that brings up the Main interface worksheet of the spreadsheet, and has the sheet tabs set to not be visible (you know when you can go tools options sheet tabs and click it to not be visible). Also i want no toolbars visible apart from the basic worksheet menu bar (file, edit, view, etc).

A second macro will if what the user types into a specified cell is correct (an If... Then statement) unlock the system by running a macro that makes the standard, formatting, forms, and drawing toolbars visible on the screen and puts up the sheet tabs again.
Daniel Cremin is offline   Reply With Quote
Old Mar 28th, 2002, 12:15 PM   #5
Daniel Cremin
Board Regular
 
Join Date: Feb 2002
Posts: 64
Default

Oh yeah is it possible to have Excel save a workbook then save it as a pre-named workbook e.g. "year10archive", without having the Are you sure you want to overwrite the existing workbook message box popping up?
Daniel Cremin is offline   Reply With Quote
Old Mar 28th, 2002, 12:20 PM   #6
Mark O'Brien
MrExcel MVP
 
Mark O'Brien's Avatar
 
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
Default

OK, thanks for pointing out the nametab in the options. I missed that before.

You're looking for something like this then:


Public Sub main()

Dim cmdbar As CommandBar

For Each cmdbar In Application.CommandBars
cmdbar.Enabled = False
Next

With ActiveWindow
.DisplayHeadings = False
.DisplayWorkbookTabs = False
End With

End Sub


Write another sub with the stuff set to True should reset the workbook.
__________________
Mark O'Brien

Columbus Ohio Celtic Supporters Club
Mark O'Brien is offline   Reply With Quote
Old Mar 28th, 2002, 12:21 PM   #7
Mark O'Brien
MrExcel MVP
 
Mark O'Brien's Avatar
 
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
Default

Quote:
On 2002-03-28 11:15, Daniel Cremin wrote:
Oh yeah is it possible to have Excel save a workbook then save it as a pre-named workbook e.g. "year10archive", without having the Are you sure you want to overwrite the existing workbook message box popping up?
Use:

 Application.DisplayAlerts = False


Are you sure you want to be able to see Excel at all?
__________________
Mark O'Brien

Columbus Ohio Celtic Supporters Club
Mark O'Brien is offline   Reply With Quote
Old Mar 29th, 2002, 06:49 AM   #8
Jack in the UK
Board Regular
 
Join Date: Feb 2002
Posts: 3,064
Default

Mark

Out of intrest IE allow choisk opening of HTML so yes Excel could be totally hidden!


__________________
Free Excel based Web Toolbar available here.

Jack in the UK
J & R Excel Solutions
"making Excel work for you"
Jack in the UK is offline   Reply With Quote
Old Mar 29th, 2002, 07:08 AM   #9
dk
MrExcel MVP
 
Join Date: Feb 2002
Location: Sydney, Australia
Posts: 2,908
Default

You can set the worksheet so that only unlocked cells are selectable by doing this:-

Sheets("Sheet name").EnableSelection = xlUnlockedCells

HTH,
D
dk is offline   Reply With Quote
Old Mar 31st, 2002, 05:10 PM   #10
Daniel Cremin
Board Regular
 
Join Date: Feb 2002
Posts: 64
Default

cheers mate for the last bit of code there! It means instead of having to go to every worksheet and then do the protection i can just set each worksheet to be like that!
Daniel Cremin 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 03:02 AM.


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