Code to hide window elements in a specific file

Hi there,

I have the following code which works to remove toolbars when a
specific file is opened.  But I would also like for the formula bar,
status bar and sheet tabs to be hidden when the file is opened.  These
must, however, all be visible again when any other file is opened. 
Please help!


Code in This Workbook:
Private Sub Workbook_Activate()
    Dim bar As CommandBar
    For Each bar In Application.CommandBars
    bar.Enabled = False
    Next
End Sub

Private Sub Workbook_Deactivate()
    Dim bar As CommandBar
    For Each bar In Application.CommandBars
    bar.Enabled = True
    Next
End Sub
0
12/19/2003 10:03:33 AM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
331 Views

Similar Articles

[PageSpeed] 53

Take a look under Tools|Options|View Tab.

You'll see the 3 things that you want to toggle.  And you could record a macro
when you do it once to get the code.



Rob Gould wrote:
> 
> Hi there,
> 
> I have the following code which works to remove toolbars when a
> specific file is opened.  But I would also like for the formula bar,
> status bar and sheet tabs to be hidden when the file is opened.  These
> must, however, all be visible again when any other file is opened.
> Please help!
> 
> Code in This Workbook:
> Private Sub Workbook_Activate()
>     Dim bar As CommandBar
>     For Each bar In Application.CommandBars
>     bar.Enabled = False
>     Next
> End Sub
> 
> Private Sub Workbook_Deactivate()
>     Dim bar As CommandBar
>     For Each bar In Application.CommandBars
>     bar.Enabled = True
>     Next
> End Sub

-- 

Dave Peterson
ec35720@msn.com
0
ec35720 (10082)
12/19/2003 5:12:38 PM
Reply:

Similar Artilces:

Re: merging a pub file into a pub document?
GbH wrote: > I'm sure I've seen this somewhere in here or a similar newsgroup. > Someone clever has written a script that will import a publisher > document into an existing/open publisher document. > Please can somebody point me at it. > > -- Also why did my post seem to disappear off the server before I could read it? -- -- Wisdom and experience come with age, they say, but I wish I could remember the darn question Both of your posts show -- Don Vancouver, USA up here. "GbH" <Geoff_Hannington@IEE.ORGasm> wrote in message news:u7JmyS0d...

Integrate Paycodes, benefit codes and deduction codes
Has anyone used integration manager to update new pay rates, deduction amounts and benefit amounts for employees? At the beginning of each year, our company gives pay increases and we need to update the pay codes, deduction codes and benefit codes for 40 employees, which we get the information from a spreadsheet. I thought that maybe I could use integration manager to update the pay, benefit and deduction codes instead of going into each employee's card, which is time consuming. Thanks, Laura Integration Manager will allow you to do this. Use the Payroll Master Destination. one ...

Can't delete file
I just did a system recovery on a Gateway with XP Pro from the restore partition on the hard drive. One of the restore options was to save the old windows files in a folder called Backup (date). So I did that. After restoring the OS I copied all the files I needed back into the new install from the backup folder. Then I wanted to delete the backup folder. Everything deleted OK except... C:\Backup\Windows\System32\Macromedia\Flash\flash8a.ocx No way in hell can I get it deleted. "access denied". I booted into Safe Mode where I could get to the security options and no mat...

zip codes don't merge #2
I am trying to mail merge w/ Word 2000 the names and addresses in my worksheet. When I get to the part to choose the format for the mailing labels, I choose F1, F2, etc. to F6 (which is the zip code column). A few do get there, but the vast majority stop at the state, leaving off the entire zip code. I have gone to menu/format and selected text in the number tab. I have gone to format/cells and chosen special/zip code in the number tab. I've read Excel for Dummies. Please help me. TIA bb ...

Cannot access windows update via Control Panel
But I can access windows update if I first start IE8 and select windowsupdate from the Tools menu. When I try to access windows update via Control Panel, I get this message: 1. On the Tools menu in Internet Explorer, click Internet Options. 2. Click the Security tab. 3. Click the Trusted Sites icon, and then click Sites... 4. Uncheck the "require server verification" checkbox. 5. Make sure the following URLs are listed in the Web Sites list box: * http://*.windowsupdate.microsoft.com * http://*.windowsupdate.com I followed the ...

concatenating two vendor codes
My company recently changed the vendor codes and now I end up with two separate sets of data for each vendor. Obviously I could just leave the vendor code field out. I don't want to do that so what I need to do is concatenate the two codes. Example Vendor Code Vendor Name 123 Joe's Supplies ABC Joe's Supplies what I need is this Vendor Code Vendor Name 123/ABC Joe's Supplies any ideas? Rather than create a new record for each vendor, add another field to the table -- call it NewVendorCode -- and put th...

Can MS EXCEL remove duplicates and separate by color coded items ?
Can MS EXCEL remove duplicates and separate by color coded items ? I am NOT technical and have just started using MS EXCEL. Can anyone PLEASE HELP me: 1. How can I automatically remove duplicates using EXCEL ? ie the same info input more than once on different lines. Can EXCEL do this ? 2, I have color coded the text in the certain lines in terms of priority. can Excel rearrange the data by color ? If yes, How do I do it ? I think I have EXCEL '97 Thanks for your help in advance. Hi 1. You can extract the unique items to a new list using menu Data > Filter > Advanced fil...

Windows live messenger has stopped working
when I boot my PC and start Windows 7 WLM during the startup phase stops working before it has fully started. If however i start it after the boot up process is complete it works fine. I am using Window 7 64 Home Prem... and am running a new ATI 5800 series card, have 4g of ram etc..... Any ideas? I have read through the posts on this board and i do not see my problem though it is likely related to the other ones i have seen. Greetings, It might be a bit hard to isolate what's causing this without disabling other things starting at startup, as it's probably just a...

16 bit code
Hello, I have a 16 bit code to maintain. (It is too complex to copile it to 32 bit) so all we are doing is support. Now they want to add a small feature, where I need to copy long file names in the project. I know we can not do long file name copies in vc++ (1.52). So I wrote a program in VC++(6.0) which does directory copy. My questions are 1. How can I call a 32 bit exe (I guess WinExec should work)? 2. How can I make the 16 bit to wait till the 32 bit code completes? 3. Is there any other better way to do this? (other than converting to 32 bit) Thanks. I actually do this in an old 16-bi...

Money 2000 Windows XP SP2 Password problems
Hi. * I have reformatted my hard drive (On a Compaq Table TC1000) & reinstalled Windows XP Pro Tablet. * I have then installed the Windows XP SP2. I then restored my backups, which included my mny data file from Money 2000. * I then (amongst other software installs) installed Money from the original CD. * When I tried to start Money, it asks for the password as usual BUT it doesn't accept the usual password. * I have checked that it is the right file, checked Caps Lock, typed carefully several times - to no avail. * Are you aware of any problems with Money 2000 & SP2? I...

NDIS intermediate driver under Windows 7
I have a monitoring firewall app that uses NDIS intermediate driver. Everything is fine under XP. But under Windows 7, I am able to install the NDIS driver, but the app complains that it can not connect to driver when it starts up. Any hints or pointers? -- Programmer's Goldmine collections: http://preciseinfo.org > the NDIS driver, but the app complains that it can not connect to > driver when it starts up. Access denied? is the app running with admin privileges? --=20 Maxim S. Shatskih Windows DDK MVP maxim@storagecraft.com http://www.storagecraft.com ...

VBA Code for Pasting Sheets
I would like a spreadhseet that pastes the contents of one sheet into another sheet. I like like to do this for 7 different sheets For example: I would like paste the contents form sheet titled "sheet1" into a sheet titled "data1". Continue to process for pasting "sheet2" into "data2" and "sheet3" into "data3" all way until "sheet7" and "data7". thanks, Curt Subject: Automated Copy Paste Subject: Copy/Paste Import/Export Data VBA Code On Apr 27, 10:49=A0am, Curt <C...@discussions.mi...

area codes is auto filling my own 9 digit ph# vs just area code
When I enter a phone number for a contact it autofills with my personal area code and phone number instead of just the area code. How to I change this to just autofil the area code? I am using Outlook 2007 on an ACER laptop. Make sure you have your area code entered correctly in "Dialing Properties". "Computer Dummy" wrote: > When I enter a phone number for a contact it autofills with my personal area > code and phone number instead of just the area code. How to I change this to > just autofil the area code? I am using Outlook 2007 on an ACER ...

Access file types?
I have created an Access database and have designed a form. When selecting "Form View" the forms remains in design view. I then get a new database which is an LDP file which I cannot delete and restricts using the mdp file. Why can I not view the designed form in Form View? It's LDB, not LDP; and MDB, nor MDP The LDB file is a locking database. It cannot be deleted while the main database is open. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.accessmvp.com http://www.mvps.org/access "Wayne Viles" <WayneViles@discussions...

MC/VISA joint code
Isn't there any way to combine the blocks (4* & 5*) for MC/VISA credit cards? It's a pain to have them separate because my bank posts them together. It is the same company afterall. It would save me a lot of time adding separate entries together to reconcile the statement! I do not know of a way to do what you are asking, but I have found that using the # symbol as follows works better than using the * symbol: 4############### 5############### If you use the * symbol it is a wild card with no determined length. The # symbol requires that the characters after the first d...

open/import Lotus wk4 files into Excel 2007 w\ formulae intact
I do not access to Lotus Smartsuite and need to import an old Lotus wk4 spreadsheet into Excel with the formuale intact. It would be huge hassle to recreate it and I am not going to invest in Smartsuite. thanks hi 2007 does not support lotus. so you need to find someone with lotus or check in to open office. it's free. http://openoffice.org regards FSt1 "jrj19" wrote: > I do not access to Lotus Smartsuite and need to import an old Lotus wk4 > spreadsheet into Excel with the formuale intact. It would be huge hassle to > recreate it and I am not going to invest i...

windows installer 3.0
My computer is OS Windows XP PRO, SP3. I attempted to upgrade my security suite CA2007 to CA ISS 2010 and I was only able to partially install it. A windows installer message kept popping up asking to install a file from a temp folder and showing the Source List product code. I used regedit to look up the code and it belongs to a "AMRT.msi". Looking for this file on the Web; I think it could possibly be malware. It is not doing anything-I think-it is just there in the registry. This pop up message from Windows Installer is preventing me from installing AntiVirus softwar...

windows installer; preparing to install
Every time I go to open OUTLOOK, I get a message saying 'Preparing to install' that won't go away for up to 1 minute. The hard-drive on this pc recently crashed, and all the programs on it were reinstalled, so I think the problem has something to do with the registry. I have an install CD for Office 2003 that includes OUTLOOK, and when I try and uninstall / reinstall the program, it isn't removing Outlook - that selection is grayed out. ...

Uninstall MS Office 2010 Beta on Windows 7
I downloaded and installed the beta version of MS Office 2010 on my system running Windows 7, 64 bit. It ran great. The newer features are much better than what is currently available. One day I fired up the Word module and was hit with the error message "program is corrupt, uninstall or re-install to correct the problem". My problem is I can't do either. I keep getting the corrupt message and the same corrective measures to take. Anyone have a fix or suggestion - Thanks ...

Money 2004 - Experian Offer
I just loaded Money 2004 Deluxe and converted my 2003 files with no problem. I decided to give the free year of credit monitoring from Experian a try but after filling everything out I get an error that the provided code has expired. I neither had nor provided any code for this offer, I only used the link from Money 2004. Now Experian was more than willing to set up a $79 account if I wanted to proceed. Any solution out there? I have the same problem... I am looking for a FREE way to contact Microsoft about this problem. >-----Original Message----- >I just loaded Money 2004 ...

How to open different excel books in different windows?
I just want to know which options should be enabled to open different exel sheets in different windows by opening single Excel application Just open them! If you want to see more than one at the same time, reduce the size of each window, so that you can fit them either side-by-side, or one in the upper half, and one in the lower half. I.e., move your mouse to one of the borders, click and drag to the middle of the screen "Yoga" wrote: > I just want to know which options should be enabled to open different exel > sheets in different windows by opening single Excel appl...

DOS window title..
Hi guys, anybody please explain how to show my texts into DOS window title.. I am spawning DOS program(file editor) by CreateProcess() and I want to display opened file name. Thanks. Bob SetConsoleTitle "Bob" <bbg9507@quicksilver.net.nz> wrote in message news:SF_fd.88$op3.2555@news.xtra.co.nz... > Hi guys, anybody please explain how to show my texts into DOS window > title.. > I am spawning DOS program(file editor) by CreateProcess() and I want to > display opened file name. Thanks. Bob > > Thanks River, can you give a bit more detailed usage of SetC...

active window behind inactive, & other probs; font corruption?
Version: 2008; operating system: Mac OS X 10.5 (Leopard); processor: PowerPC I was referred here from another support list, because the expert advising me there suggested that I might have complicated subtle font problems; I am very grateful for any advice! This message is long, because several things are going on and I've tried several solutions. I routinely work with six or so Word files open, half of which have Track Changes turned on. I recently installed Word 2008 (upgrading from Word X), and have been having strange problems. When I select a group of files in the Finder ...

Getting a specific parent of any node via xpath navigation
I am storing my site structure as such: <menuItems> <menuItem> <pageID>1</pageID> </menuItem> <menuItem> <pageID>2</pageID> <menuItem> <pageID>4</pageID> <menuItem> <pageID>5</pageID> <menuItem> <pageID>6</pageID> </menuItem> </menuItem> </menuItem> </menuItem> <menuItem> <pageID>3</pageID> ...

Saving OFX files from California Bank Of America...convert ofx?
All, I've seen similar posts, but not exactly the same. I saved an OFX from California BofA, and I can no longer retrieve the data in a different format (it's older than their three month deadline). When I try to import it, I get the familiar 'There is a problem with the data received from this online provider. If the problem persists, call the provider's customer service number for help.' Can I convert the OFX to OFC or QIF (which had worked for me previously). It seems like there are conversion utilities for almost every other format to OFX, but not from ...