Hide toolbars when file opens

Hi all,

I have created a file for people to use to get quotes.  When the file
opens, I do not want them to have access to any toolbars.  How can I
hide these when the file is opened, but only for this file - not any
others that the user may subsequently open.  All that they may need to
do, is print the page out after getting a quote.

Many thanks.

Rob
0
11/6/2003 1:17:20 PM
excel.misc 78881 articles. 5 followers. Follow

3 Replies
892 Views

Similar Articles

[PageSpeed] 39

You can use this in the Thisworkbook module Rob

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


-- 
Regards Ron de Bruin
(Win XP Pro SP-1  XL2002 SP-2)
www.rondebruin.nl



"Rob Gould" <robin_gould_durban@hotmail.com> wrote in message news:ffbbcdf4.0311060517.57a2ba74@posting.google.com...
> Hi all,
>
> I have created a file for people to use to get quotes.  When the file
> opens, I do not want them to have access to any toolbars.  How can I
> hide these when the file is opened, but only for this file - not any
> others that the user may subsequently open.  All that they may need to
> do, is print the page out after getting a quote.
>
> Many thanks.
>
> Rob


0
rondebruin (3790)
11/6/2003 1:41:09 PM
Thanks Ron - That is great.  Can you add code so that  the formula
bar, and sheet tabs are also hidden? Also, there are 3 worksheets in
this file.  I need the same settings on all sheets - at the moment,
the second and third sheets still show the row and column headings,
which I would like hidden as per sheet 1.

Many thanks for your help.

Regards,

Rob
0
11/7/2003 9:14:47 AM
Hi Rob

>and sheet tabs are also hidden
>row and column headings

This things will be saved with the file
Change it in Tools>Options and save the file

For the formulabar/statusbar you can use this
Run the subs in the Activate and Deactivate event

copy the code below in a normal module

Dim Sbar As Boolean
Dim fbar As Boolean

Sub hide()
    Dim bar As CommandBar
    For Each bar In Application.CommandBars
    bar.Enabled = False
    Next
    fbar = Application.DisplayFormulaBar
    Sbar = Application.DisplayStatusBar
    With Application
    .DisplayFormulaBar = False
    .DisplayStatusBar = False
    End With
End Sub

Sub show()
    Dim bar As CommandBar
    For Each bar In Application.CommandBars
    bar.Enabled = True
    Next
    With Application
    .DisplayFormulaBar = fbar
    .DisplayStatusBar = Sbar
    End With
End Sub


-- 
Regards Ron de Bruin
(Win XP Pro SP-1  XL2002 SP-2)
www.rondebruin.nl



"Rob Gould" <robin_gould_durban@hotmail.com> wrote in message news:ffbbcdf4.0311070114.54f0b544@posting.google.com...
> Thanks Ron - That is great.  Can you add code so that  the formula
> bar, and sheet tabs are also hidden? Also, there are 3 worksheets in
> this file.  I need the same settings on all sheets - at the moment,
> the second and third sheets still show the row and column headings,
> which I would like hidden as per sheet 1.
>
> Many thanks for your help.
>
> Regards,
>
> Rob


0
rondebruin (3790)
11/7/2003 12:31:37 PM
Reply:

Similar Artilces:

How to Filter cells and save the file with certain criteria?
Hello. I have a Excel file that contains a large list of Tracking Numbers. The tracking numbers are from two sets of order types- Internet orders and Mail Orders. Orders that are from the Internet are matched up with a order number such as "5678". Orders from the mail-order side are designated by initials "MO". So in Excel it'll look something like this: trackingnumber orderid 123365656666 5467 152155896345 5468 123365634567 MO 152134567789 5469 152151234563 MO Is there a way to eliminate the Mail-Order rows and save the Excel file to ...

file send to as attachment outlook 2007
When using in word or excel command "send a copy of the document in an e-mail message as an attachment", outlook creats a new e-mail message with the document attached as it should be done. Then I add text in message body, and send the mail. It arrives only with the attachment. The text in message body disappears. This happens only if I work in outlook chache mode. My os is winXp Pro, and my server is SBS 2003. It used to work correct, until somthing happened. Any idea to solve? Thank you Zipi ...

MFC to open IE
Hello, What is the best programmatic way to open a URL explicitly using IE (assuming IE is installed on a machine, but not assuming as a default browser)? Thanks, Janiv Ratson. It would appear that the easiest way to do it is to just run (via ShellExecute, CreateProcess or whatever function you choose) the following commandline: iexplore http://www.abc.com/def/ Internet Explorer (at least as it is installed in my windows XP SP2 machine) will take a URL as a parameter and when passed a URL with no other parameters, it opens that URL in a window (in my case, a new IE window will be...

Hiding KB976002 results in security warning
Windows XP SP3 Windows update allows you to hide an update you don't want to install. Of course I have hidden KB976002 which is presented as a critical update but is not a security update and is only needed when the user wants to have it. However, now Windows Update complains that I have hidden a critical security update and that my computer will be in great danger until I restore this update. This is of course incorrect. KB976002 is not a security update. Please update the Windows Update site so that KB976002 can be hidden without further messages and incorrect warnings...

If I accidently replace a saved file can I retrieve the old file?
No. PLEASE write your question in the body of the post and NOT just the subject. Have a look here: http://dts-l.org/goodpost.htm -- Gordon Burgess-Parker Interim Systems and Management Accounting www.gbpcomputing.co.uk "kamabiv" <kamabiv@discussions.microsoft.com> wrote in message news:2A547F5D-AA2C-44D7-AEC7-8961A81AC4E5@microsoft.com... > ...

Best Practises setup with AD or File Server
Hi, We have a scenario where we are retiring out dedicated backup server. Currently we are using Symantec Backup Exec 11d. However, instead of replacing the dedicated server, their is a suggestion that I use existing servers for Backup Exec Are their known issues installing backup exec on a DC which also holds FSMO roles (PDC etc)? The other option is to install backup exec (and tape drive) on a file server which hosts the H and S drives. what do you think? I would use the file server. Presumably it is being accessed during the day when no backups are running. The b...

Split Forms
Is it at all possible to hide the Data Sheet portion of a split form at run time in 2007? The only solution I have found is to play with the SplitFormSize property, but I am afraid that it does not support different display sizes. Any suggestions ? Thanks ...

Can't open shared access database with double click from explorer.
While trying to diagnose Access 2007 corrupting Access 2000 databases, I've come across a situation where if I try to double click an MDB file on a shared network drive, nothing happens. Access doesn't start (either with access 2000 or access 2007). However, if I wait til I get the "Open File - Security Warning" on one machine, then double click it on the other, then I can open it on both machines. In addition, I can always open it from the open menu in access. Obviously something to do with the open file warning is going on here. Is there any way to set the regist...

Automatic opening
Please could someone advise how to stop the mail opening for a moment,before I delete. This seems to imply especialy on spam that I have read the message. Thanks The fact that Outlook shows the msg as being read has no connection with the sender, unless you send a read receipt "DEACON SCREWS" <rldeacon@btconnect.com> wrote in message news:rr6dnWdqmrKtvu3XnZ2dnUVZ8gmdnZ2d@bt.com... > Please could someone advise how to stop the mail opening for a > moment,before I delete. > This seems to imply especialy on spam that ...

Starting with a new pst file
Hi, I would like to start with a blank pst file. I want to start again with no contacts, no emails, no appointments. How should I proceed to make this? Thanks for your help, Olivier Olivier Verdin <olivier.verdin@playcorporate.com> wrote: > I would like to start with a blank pst file. I want to start again > with no contacts, no emails, no appointments. Assuming Outlook 2002/2003, since you didn't think it important to mention your Outlook version, click File>New>Outlook Data File, Browse to where you want the new PST (or accept the default), give it a name ...

Intercept file download in IWebBrowser2
I have a MFC application host a webbrowser(IWebBrowser2).Basiclly ,I hope when user click a file download url(href="test.zip"),I can intercept the download message and process it by my own download component instead of IE itself. Is it possible? Any article will be help. Adv tks. http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/ext/overview/downloadmgr.asp "L.J.S" <bconline2002@hotmail.com> д����Ϣ����:Oc7j%23OcAFHA.612@TK2MSFTNGP09.phx.gbl... > I have a MFC application host a webbrowser(IWebBrowser2).Basiclly ,I > hope ...

accidently deleted file
Somehow I deleted the file MSMONEY.EXE. It seems I did prior to a restore point on my system. Is there anyway to get it back? Thanks....Inker Reinstall Money from the CD. It won't affect your data - that is kept on the *.mny file. -- Regards Bob Peel, Microsoft MVP - Money Hints/Tips http://support.microsoft.com/default.aspx?scid=fh;EN-GB;mny UK Wishes/Suggestions mnyukwsh@microsoft.com "Inker" <anonymous@discussions.microsoft.com> wrote in message news:072c01c3d799$f6d99a90$a501280a@phx.gbl... > Somehow I deleted the file MSMONEY.EXE. It seems I di...

how can I get a publisher file to acrobat reader
I have a Regestration Form created in publisher 2003. When a confrence addtendee signs on to our web site they need to be able to click on a file (acrobat reader) Hopfuly, and download it and print it so they can fill out the form and mail it off. (I say acobat reader because that seems to be the most common way it's done. I dont see an export in publisher or a inport to acrobat. how can i make this happen You will need a third party program to create the pdf file. Adobe Acrobat but it's spendy or a freebee i.e., Primopdf or another commercial program of modest cost, i.e., PDF-XC...

put files together
Hi all, I have in a directory "summary" some 800 files with a number for a name, like 8, 23, 44, 124, 2045 up to somewhere in the 2500's. There is no list of all those file names. Each file is a workbook with only one sheet called "ABCD". I know that the last cell used will be a cell in column H. I also know that the content of that cell will be ==== (4 to 7 times =). Column H will contain text, blanks (empty cells), numbers and other characters (like f.i. =). The number of rows used will be at least 6 and could be as much as 200 or so (25 is typical). I need ...

Hide toolbars when file opens
Hi all, I have created a file for people to use to get quotes. When the file opens, I do not want them to have access to any toolbars. How can I hide these when the file is opened, but only for this file - not any others that the user may subsequently open. All that they may need to do, is print the page out after getting a quote. Many thanks. Rob You can use this in the Thisworkbook module Rob 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 C...

Permanently open Group Schedule
Is there any way I can configure things such that a Group Schedule is permanently open, i.e. when I exit and restart Outlook? Not that I know of in any version of Outlook that supports group = schedules. --=81 Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. =20 After furious head scratching, Chris Mitchell asked: | Is there any way I can configure things such that a Group Schedule is | permanently open, i.e. when I exit and restart Outlook? ...

excel opens up looking like it is in ms dos
how can I get my excell to stop opening up looking like it is in MS-DOS mode. I get an error message that wants to send the info to microsoft, when it hit yes send or no don't send it then shuts down. Hi what exact error message do you get and does this happen all the time for all files? -- Regards Frank Kabel Frankfurt, Germany osborne4 wrote: > how can I get my excell to stop opening up looking like it is in > MS-DOS mode. I get an error message that wants to send the info to > microsoft, when it hit yes send or no don't send it then shuts down. Sounds like you...

Problem with .rc files in VS 2005
I have several projects that were created with VS 2003. These are MFC based applications with .RC files that contain localized strings. Some of these strings are Japanese, Korean, and Chinese encoded in MBCS. These projects work fine in VS 2003. I converted these projects to compile with VS 2005 and if I bring up the resource editor to view or modify the string resources, VS 2005 will modify the Japanese, Korean, and Chinese strings. It will replace the characters with all "?" question marks. Is there some setting that I need to set to prevent VS from modifying my string...

Configure a shortcut file programmatically?
Under program control, I want to change the paths to point to a database on the user's local drive. From within Access, does anybody know how to do this? Are you saying you want to create a shortcut file? Take a look at my May, 2004 "Access Answers" column in Pinnacle Publication's "Smart Access". You can download the column (and sample database) for free at http://www.accessmvp.com/DJSteele/SmartAccess.html -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "David Portwood" <Mondrogan@yahoo.com> wro...

Outlook 2003 PST file issues
I created a backup.pst form Outlook 2003. I also copied the outlook.pst file onto a cd. I had to format my HD and reinstall Windows XP and Office 2003. When I try to open either of the two PST files I get an error message "The file C:\path info\backup.pst is not a personal folder file." Can anyone please help me. All of my important email data is in there. I followed the instructions on the Microsoft site for backing up the file, not it won't open. Did you remove the read only attribute these files acquired from being on a CD? -- Russ Valentine [MVP-Outlook] "Brad&...

Outlook 2003 attachement not opened
Hi, I've just installed Outlook 2003 and I have this problem: a friend sent = me an e-mail containing an attached e-mail message (signed, if it = matters), and Outlook wouldn't open it saying "An error occured in the = underlying security system". How can I open that file? Note that that file has a ZIP file attached, = so this could be the problem. Thanks in advance, Radu ...

Adding attachments to msg-files
I have a big problem regarding editing of MSG-files. This is what I do: 1. Open a MSG-file from Windows Explorer 2. Add an attachment (i.e a Word-document) to the email. 3. Save and close the email. When I re-open the MSG-file the attachment is missing! Instead Outlook has created a copy of the email in my inbox(!), and that copy contains the attachment. This has been tested with different mail-formats (HTML, Plain Text and RTF), and with Outlook 2000 and Outlook 2003 with the same result. Can anyone explain this behavior? I would call this a bug in Outlook, since changes you believe you ar...

Cannot find MRT.log File
I've read that this is located in the windows\debug\ dir. I have searched for the file name in my entire drive and it's not there. I've been running MRT for a long time now, in its monthly updates. The MRT.exe file is located in its proper place. So as it stands the thing runs and I can't find out whether it found bad stuff or not. Can someone please tell me how to get to that log file. Thanks. On this system, the log file is \windows\debug\mrt.log. Jim <programmernovice@yahoo.com> wrote in message news:7b47fa93-576e-4a85-9d8b-b0572d9ad34f@h9g2000yqa.googleg...

How do I set up a file to automatically save on exit?
I have created a file that several users will be accessing with varying computer skill level. I want to be sure that the file saves automatically when they close the file out rather than having to answer "yes" to the "Do you want to save this file?" question. Can this be done? Brian Yes, that can be done with VBA programming. The following macro will save the file whenever a close command is issued by the user, regardless of whether the file has already been saved. This is a Workbook event macro and must be placed in the workbook module. Post back an...

File Won't Open
Hi, I accidentally opened an xls file in Word, saved it with the Save command and now can't open it in Excel. Help please! -- Roadrunner ------------------------------------------------------------------------ Roadrunner's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=27140 View this thread: http://www.excelforum.com/showthread.php?threadid=466566 It's gone, you might be able to open it in word and get some text info out of it but essentially it's gone :( -- Regards, Peo Sjoblom (No private emails please) "Roadrunner" <Roadr...