![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Posts: 64
|
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 |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Posts: 64
|
does ne one know anything that can help me with this?
|
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
-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) -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 |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Posts: 64
|
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. |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Posts: 64
|
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?
|
|
|
|
|
|
#6 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
OK, thanks for pointing out the nametab in the options. I missed that before.
You're looking for something like this then:
Write another sub with the stuff set to True should reset the workbook. |
|
|
|
|
|
#7 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
Quote:
Application.DisplayAlerts = False Are you sure you want to be able to see Excel at all? |
|
|
|
|
|
|
#8 |
|
Board Regular
Join Date: Feb 2002
Posts: 3,064
|
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" |
|
|
|
|
|
#9 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sydney, Australia
Posts: 2,908
|
You can set the worksheet so that only unlocked cells are selectable by doing this:-
Sheets("Sheet name").EnableSelection = xlUnlockedCells HTH, D |
|
|
|
|
|
#10 |
|
Board Regular
Join Date: Feb 2002
Posts: 64
|
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!
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|