Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protection
Hi to all, do you know if any way to remove the Visual Basic tool bar from a file, I did in my file, but when the users open my file in their computer, the Visual Basic bar is there, How can I save the properties of the file and keep them in all computers
Thanks this place is a excelent! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protection
Hi Francisco,
I suspect that managing the visible property will serve your purpose. The following is something I've used: '******* CLOSE & RESTORE TOOLBARS ********** 'ToolBar_List is a defined name, 1 cell range 'on worksheet #1 Sub CloseToolbars() 'CALL FROM AUTO_OPEN MACRO Dim Oset As Integer On Error GoTo TBCloseError Oset = 1 ThisWorkbook.Worksheets(1). _ Range("ToolBar_List").CurrentRegion. _ Offset(1, 0).ClearContents For Each t In CommandBars If t.BuiltIn And t.Visible And _ t.Name < "Worksheet Menu Bar" Then ThisWorkbook.Worksheets(1). _ Range("ToolBar_List"). _ Offset(Oset, 0).Value = t.Name t.Visible = False Oset = Oset + 1 End If Next Exit Sub TBCloseError: MsgBox "Close ToolBar Error" End Sub Sub RestoreToolbars() 'CALL FROM AUTO_CLOSE MACRO Dim R As Object On Error GoTo TBRestoreError Set R = ThisWorkbook.Worksheets(1). _ Range("ToolBar_List"). _ CurrentRegion.Offset(1, 0) For Each C In R.Resize(R.Rows.Count - 1, 1) CommandBars(C.Value).Visible = True Next R.ClearContents Set R = Nothing Exit Sub TBRestoreError: Set R = Nothing End Sub Francisco, if you really want to lock out the user's access to toolbars, consider using the enabled property instead of the visible property. Best Regards, Walt -----Original Message----- Hi to all, do you know if any way to remove the Visual Basic tool bar from a file, I did in my file, but when the users open my file in their computer, the Visual Basic bar is there, How can I save the properties of the file and keep them in all computers? Thanks this place is a excelent! . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Data Protection Best Practice: AKA: Real Sheet Protection | Excel Discussion (Misc queries) | |||
Excel Data Protection- AKA: Sheet/Macro Password Protection | Setting up and Configuration of Excel | |||
WS Protection: Different Levels of Protection on Different Ranges | Excel Discussion (Misc queries) | |||
Cell Protection vs. Worksheet Protection | Excel Discussion (Misc queries) | |||
Worksheet protection is gone and only wokbook protection can be se | Excel Discussion (Misc queries) |