Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
deleting toolbars
Hi,
I need some help with how to manage the deletion of a custom toolbar in Excel. I am creating the toolbar from the workbook when the workbook is opened and deleting it when is closed. The problem is that the user could create different workbooks from the one I am distributing(utilizing save as) and have them open at the same time. What I am notising is that when the user closes any of the workbooks the toolbar dissappears form thr other opened workbooks ,however, I need the tool bar to be still displayed in each individual workbook as the user could still be using it. Any suggestion on how to make the toolbar stay for each opened file that is a copy of the original workbook, without having to create an add in? thanks dvs |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
deleting toolbars
I would suggest that a workbook only delete the toolbar if it is the only
workbook open created from your template. I think you could identify such workbooks by a defined name that is present in them, but not likely in other workbooks. For example: Sub CloseToolBar() Dim WB As Workbook Dim NamesCounter As Integer Dim Dummy As String On Error GoTo NoName For Each WB In Workbooks Dummy = WB.Names("MyTemplateSpecialName").Value NamesCounter = NamesCounter + 1 NextWB: Next If NamesCounter = 1 Then DoDeleteTB ''Only in this workbook Exit Sub NoName: Resume NextWB End Sub -- Jim Rech Excel MVP |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
deleting toolbars
I have solved similar problems, however, could use a
little more information. When you open numerous copies of the workbook, do you get numerous toolbars? If no, why not? David Fixemer |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
deleting toolbars
"david fixemer" wrote in message ...
I have solved similar problems, however, could use a little more information. When you open numerous copies of the workbook, do you get numerous toolbars? If no, why not? David Fixemer If I open two different workbooks that were created form the same template (or original workbook) with the same exact VBA code, there is a toolbar for each window of excel (or opened workbook). If I comment out the delete toolbar code, the toolbar on which window stays when one of the other workbooks is closed. however, there is an empty toolbar on any other file that I create or open afterwords if they are not from the original tmeplate (workbook) that contained the code. thanks dvs |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Deleting cell data without deleting formula | Excel Discussion (Misc queries) | |||
how prevent formula in cell from deleting when deleting value???? | New Users to Excel | |||
Deleting Hyphens or Dashes from multiple cells without deleting the remaining content | Excel Programming | |||
Adding/Deleting from toolbars using VBA | Excel Programming | |||
Adding / Deleting from toolbars | Excel Programming |