Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067

    Unanswered: 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

  2. #2
    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

  3. #3
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    Thanks Smitty

    That was exactly what i was needing


    David

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •