Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Remove add-in - also remove toolbar

Hi,

I have made an Excel Add-In that I instal using an homemade MSI package -
this of cause activates the Add-In in Excel so the user are ready to work...

BUT uninstall... well it works fine - removes the xla file and cleans the
reg.db but the toolbar in Excel remains there..

I can of cause delete the file Excel11.xlb to delete ALL custom toolbars...
but thats really not an option!


Any ideas to how remove the toolbar for my add-in when the uninstaller does
it's job?


Thanks,
Flemming


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 449
Default Remove add-in - also remove toolbar

Hi Flemming

Run this little macro he

Sub Clean()
Dim TB As CommandBar
For Each TB In CommandBars
If TB.BuiltIn = False Then
If MsgBox("Delete " & TB.Name & "?", _
vbYesNo + vbQuestion) = vbYes Then
TB.Delete
End If
End If
Next
End Sub


HTH. Best wishes Harald

"Flemming" wrote in message
...
Hi,

I have made an Excel Add-In that I instal using an homemade MSI package -
this of cause activates the Add-In in Excel so the user are ready to
work...

BUT uninstall... well it works fine - removes the xla file and cleans the
reg.db but the toolbar in Excel remains there..

I can of cause delete the file Excel11.xlb to delete ALL custom
toolbars... but thats really not an option!


Any ideas to how remove the toolbar for my add-in when the uninstaller
does it's job?


Thanks,
Flemming



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Remove add-in - also remove toolbar

Hi Harald

I can remove a toolbar(commandbar) with code from within Excel, but it need
to be something that can be run from the uninstaller and hopefully when
Excel are closed.

/Flemming


"Harald Staff" wrote in message
...
Hi Flemming

Run this little macro he

Sub Clean()
Dim TB As CommandBar
For Each TB In CommandBars
If TB.BuiltIn = False Then
If MsgBox("Delete " & TB.Name & "?", _
vbYesNo + vbQuestion) = vbYes Then
TB.Delete
End If
End If
Next
End Sub


HTH. Best wishes Harald

"Flemming" wrote in message
...
Hi,

I have made an Excel Add-In that I instal using an homemade MSI package -
this of cause activates the Add-In in Excel so the user are ready to
work...

BUT uninstall... well it works fine - removes the xla file and cleans the
reg.db but the toolbar in Excel remains there..

I can of cause delete the file Excel11.xlb to delete ALL custom
toolbars... but thats really not an option!


Any ideas to how remove the toolbar for my add-in when the uninstaller
does it's job?


Thanks,
Flemming





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Remove add-in - also remove toolbar

If all the (un)installer does is unpack the xla to file and write/remove the
necessary registry entries -
First it should check if Excel is running and if so advise user to quit.
The xla should create and destroy all it's toolbars and buttons in the
respective load/unload events and not in the AddinInstall/Uninstall events.

If the installer creates an automated instance of Excel to install and
uninstall the addin, note that events are disabled. You could use include
Auto_Open and Auto_Close macros to create and destroy menus, see
RunAutoMacros

I can of cause delete the file Excel11.xlb to delete ALL custom
toolbars... but thats really not an option!


No don't do that!

Regards,
Peter T

"Flemming" wrote in message
...
Hi,

I have made an Excel Add-In that I instal using an homemade MSI package -
this of cause activates the Add-In in Excel so the user are ready to
work...

BUT uninstall... well it works fine - removes the xla file and cleans the
reg.db but the toolbar in Excel remains there..

I can of cause delete the file Excel11.xlb to delete ALL custom
toolbars... but thats really not an option!


Any ideas to how remove the toolbar for my add-in when the uninstaller
does it's job?


Thanks,
Flemming




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Remove add-in - also remove toolbar

You should do it in the addin, by adding code in the BeforeClose event of
the addin.

Just give your toolbar a unique tag when you create it and delete it with

Application.Commandbars.FindControl(Tag:="myTag"). Delete

--
__________________________________
HTH

Bob

"Flemming" wrote in message
...
Hi Harald

I can remove a toolbar(commandbar) with code from within Excel, but it
need to be something that can be run from the uninstaller and hopefully
when Excel are closed.

/Flemming


"Harald Staff" wrote in message
...
Hi Flemming

Run this little macro he

Sub Clean()
Dim TB As CommandBar
For Each TB In CommandBars
If TB.BuiltIn = False Then
If MsgBox("Delete " & TB.Name & "?", _
vbYesNo + vbQuestion) = vbYes Then
TB.Delete
End If
End If
Next
End Sub


HTH. Best wishes Harald

"Flemming" wrote in message
...
Hi,

I have made an Excel Add-In that I instal using an homemade MSI
package - this of cause activates the Add-In in Excel so the user are
ready to work...

BUT uninstall... well it works fine - removes the xla file and cleans
the reg.db but the toolbar in Excel remains there..

I can of cause delete the file Excel11.xlb to delete ALL custom
toolbars... but thats really not an option!


Any ideas to how remove the toolbar for my add-in when the uninstaller
does it's job?


Thanks,
Flemming









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Remove add-in - also remove toolbar

Hi Peter and Bob

Of cause - why didn't I think of that my self *s*

Thanks,
Flemming


"Peter T" <peter_t@discussions wrote in message
...
If all the (un)installer does is unpack the xla to file and write/remove
the necessary registry entries -
First it should check if Excel is running and if so advise user to quit.
The xla should create and destroy all it's toolbars and buttons in the
respective load/unload events and not in the AddinInstall/Uninstall
events.

If the installer creates an automated instance of Excel to install and
uninstall the addin, note that events are disabled. You could use include
Auto_Open and Auto_Close macros to create and destroy menus, see
RunAutoMacros

I can of cause delete the file Excel11.xlb to delete ALL custom
toolbars... but thats really not an option!


No don't do that!

Regards,
Peter T

"Flemming" wrote in message
...
Hi,

I have made an Excel Add-In that I instal using an homemade MSI package -
this of cause activates the Add-In in Excel so the user are ready to
work...

BUT uninstall... well it works fine - removes the xla file and cleans the
reg.db but the toolbar in Excel remains there..

I can of cause delete the file Excel11.xlb to delete ALL custom
toolbars... but thats really not an option!


Any ideas to how remove the toolbar for my add-in when the uninstaller
does it's job?


Thanks,
Flemming






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 449
Default Remove add-in - also remove toolbar

Sorry, sloppy reading at this side.
I don't think an uninstaller can remove things from the toolbar file. As Bob
mentions, a properly written addin should take care of this itself.

Best wishes arald

"Flemming" wrote in message
...
Hi Harald

I can remove a toolbar(commandbar) with code from within Excel, but it
need to be something that can be run from the uninstaller and hopefully
when Excel are closed.

/Flemming


"Harald Staff" wrote in message
...
Hi Flemming

Run this little macro he

Sub Clean()
Dim TB As CommandBar
For Each TB In CommandBars
If TB.BuiltIn = False Then
If MsgBox("Delete " & TB.Name & "?", _
vbYesNo + vbQuestion) = vbYes Then
TB.Delete
End If
End If
Next
End Sub


HTH. Best wishes Harald

"Flemming" wrote in message
...
Hi,

I have made an Excel Add-In that I instal using an homemade MSI
package - this of cause activates the Add-In in Excel so the user are
ready to work...

BUT uninstall... well it works fine - removes the xla file and cleans
the reg.db but the toolbar in Excel remains there..

I can of cause delete the file Excel11.xlb to delete ALL custom
toolbars... but thats really not an option!


Any ideas to how remove the toolbar for my add-in when the uninstaller
does it's job?


Thanks,
Flemming






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to remove customized button from toolbar? Eric Excel Discussion (Misc queries) 1 August 6th 09 05:44 AM
How to remove unwanted custom toolbar laura_in_abq Excel Discussion (Misc queries) 3 January 7th 08 09:55 PM
Remove Main Toolbar Noemi Excel Discussion (Misc queries) 1 February 10th 06 03:04 AM
can't remove VB toolbar Gav Excel Discussion (Misc queries) 0 December 5th 05 01:45 AM
How do I remove "Fix" from my bottom toolbar? Swaytan Excel Discussion (Misc queries) 1 August 1st 05 07:12 AM


All times are GMT +1. The time now is 11:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"