If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Restricting Toolbars

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-09-04, 11:36
DavidCoutts DavidCoutts is offline
Registered User
 
Join Date: Jan 2004
Location: Aberdeen, Scotland
Posts: 1,067
Restricting Toolbars

I am Trying to produce an Excel Workbook for the Web.
but for security reasons we have to hide the path name.

The Problem the user switches the WEB Toolbar on as this gives the complete path.

ive managed to switch off all toolbars bar the menu toolbar by the following code

Code:
Dim cmd As CommandBar
    Dim I As Integer
    
    'Switch off error messages
        Application.DisplayAlerts = False
        
    'check status of command bars then switch off all active comandbars
    For I = Application.CommandBars.Count To 2 Step -1
        If Application.CommandBars(I).Visible = True Then
            Application.CommandBars(I).Visible = False
        End If
    Next I
is there any way i can run this if the user makes a menu choice.
or is there a way of restricting the options of the menu bar

Any Help will be greatfully recieved

David
Reply With Quote
  #2 (permalink)  
Old 02-10-04, 14:50
Smitty Smitty is offline
Registered User
 
Join Date: Dec 2003
Location: San Diego, CA
Posts: 153
Code:
Sub HideCommandBars()
    Dim x As CommandBar
        For Each x In Application.CommandBars
        x.Enabled = False
    Next
End Sub

Sub UnHideCommandBars()
    Dim x As CommandBar
        For Each x In Application.CommandBars
        x.Enabled = True
    Next
End Sub
Hope that helps,

Smitty
Reply With Quote
  #3 (permalink)  
Old 02-11-04, 03:44
DavidCoutts DavidCoutts is offline
Registered User
 
Join Date: Jan 2004
Location: Aberdeen, Scotland
Posts: 1,067
Thanks Smitty

That was exactly what i was needing


David
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On