Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Addin Issues

Anybody have any ideas?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Addin Issues

On Jan 15, 11:18 am, thedude wrote:
Anybody have any ideas?


Guess not?
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Addin Issues

Well - i figured out issue 4. It appears that when you use the
'MenuItems' tags, it is a temporary solution. To fix it, i replaced
the 'Private Function AddMenus()' and 'PrivateFunction AddMenuItems()'
with the code below. However, i'm still having trouble getting the
code to delete itself after running through it as well as getting the
Add-In to replace any existing Add-Ins. Any advice would be
appreciated.

Thanks,
Thedude

Function Add_Menus()

'''''''''''''''''''''''''''''''''''''''''''''''''' '''
' Finds the index of the Help Menu. '
'''''''''''''''''''''''''''''''''''''''''''''''''' '''
HelpMenu = Application.CommandBars("Worksheet Menu Bar") _
..Controls("Help").Index


'''''''''''''''''''''''''''''''''''''''''''''''''' '''
' Sets up and enters the two Menus '
'''''''''''''''''''''''''''''''''''''''''''''''''' '''
Set cbmainmenubar = _
Application.CommandBars("Worksheet Menu Bar")
Set cbMPE_Analysis = _
cbmainmenubar.Controls.Add(Type:=msoControlPopup, _
befo=HelpMenu)
With cbMPE_Analysis
.Caption = "&Menu1"
End With
Set cbMPE_KServer = _
cbmainmenubar.Controls.Add(Type:=msoControlPopup, _
befo=HelpMenu + 1)
With cbMPE_KServer
.Caption = "&Menu2"
End With
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''
Setting up the analysis menu '
' 1 - Menu Item 1
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''
Set cbAnalysis_MenuItem1 = cbMPE_Analysis.Controls.Add _
(Type:=msoControlPopup)
With cbAnalysis_MenuItem1
.onaction = "......"
.Caption = "&MenuItem1"
End With
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''
' Setting up the analysis menu '
' 1 - Menu Item 1
' 2 - Menu Item 2
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''
Set cbAnalysis_MenuItem2 = cbMPE_Analysis.Controls.Add _
(Type:=msoControlPopup)
With cbAnalysis_MenuItem2
.Caption = "&MenuItem2"
.onaction = "......"
'.TooltipText = ""
End With
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''
' Setting up the analysis menu '
' 1 - Menu Item 1
' 2 - Menu Item 2
' 3 - Menu Item 3
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''
Set cbAnalysis_MenuItem3 = cbMPE_Analysis.Controls.Add _
(Type:=msoControlPopup)
With cbAnalysis_MenuItem3
.Caption = "&MenuItem3"
.onaction = "......"
'.TooltipText = ""
End With
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''
' Setting up the analysis menu '
' 1 - Menu Item 1
' 2 - Menu Item 2
' 3 - Menu Item 3
' 4 - Menu Item 4
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''
Set cbAnalysis_MenuItem4= cbMPE_Analysis.Controls.Add _
(Type:=msoControlPopup)
With cbAnalysis_MenuItem4
.Caption = "M&MenuItem4"
.onaction = "......"
End With
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''
' Setting up the analysis menu '
' 1 - Menu Item 1
' 2 - Menu Item 2
' 3 - Menu Item 3
' 4 - Menu Item 4
' 5 - Menu Item 5
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''
Set cbAnalysis_MenuItem5 = cbMPE_Analysis.Controls.Add _
(Type:=msoControlButton)
With cbAnalysis_MenuItem5
.Caption = "MenuItem5l"
.onaction = "......"
End With

'''''''''''''''''''''''''''''''''''''''''''''
' First is the SubMenuItem '
'''''''''''''''''''''''''''''''''''''''''''''
With cbAnalysis_SubMenuItem1a.Controls.Add _
(Type:=msoControlButton, befo=1)
.onaction = "......."
End With
With cbAnalysis_SubMenuItem1b.Controls.Add _
(Type:=msoControlButton, befo=2)
.onaction = "......."
End With


'''''''''''''''''''''''''''''''''''''''''''''''''
' Second is the SubMenuItem2'
'''''''''''''''''''''''''''''''''''''''''''''''''
With cbAnalysis_SubMenuItem2a.Controls.Add _
(Type:=msoControlButton, befo=1)
.onaction = ".......""
End With


'''''''''''''''''''''''''''''''''''''''''''''''''
' Third is the SubMenuItem3
'''''''''''''''''''''''''''''''''''''''''''''''''
With cbAnalysis_SubMenuItem3.Controls.Add _
(Type:=msoControlButton, befo=1)
.onaction = "......."
End With


'''''''''''''''''''''''''''''''''''''''''''''''''
' Fourth is the SubMenuItem4
'''''''''''''''''''''''''''''''''''''''''''''''''
With cbAnalysis_SubMenuItema.Controls.Add _
(Type:=msoControlButton, befo=1)
.onaction = "......."
End With
With cbAnalysis_SubMenuItemb.Controls.Add _
(Type:=msoControlButton, befo=2)
.onaction = "......."
End With
With cbAnalysis_SubMenuItemc.Controls.Add _
(Type:=msoControlButton, befo=3)
.onaction = "......."
End With
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Addin Issues

Okay. I've got 1, 2, 2a, 2b, 4, and 5 working. The code below did
the trick as far as deleting the install module, and i think i'm close
to figuring out why they addin won't remain checked after
installation. If anybody would like to chime in, though, please feel
free to join this very stimulating conversation we've got going on.


I think the problem before was that i had Dimensioned X as an object
as opposed to a VBComponent.

Sub SaveAndDelete()
Dim x As VBComponent

With ThisWorkbook
AddinTitle = Left(.Name, Len(.Name) - 4)
AddinName = AddinTitle & ".xla"

Application.DisplayAlerts = False
a = Application.UserLibraryPath & AddinName
.SaveAs Application.UserLibraryPath & AddinName
Application.DisplayAlerts = True
End With

For Each x In ThisWorkbook.VBProject.VBComponents
If x.Name = "Update_MP_Toolkit" Then
ThisWorkbook.VBProject.VBComponents.Remove x
End If
Next x
End

End Sub

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
setup project for Excel addin, won't register addin Gerry Excel Programming 0 October 31st 07 12:01 AM
PORTABILITY ISSUES with Excel Addin in VBA Sandeep Excel Discussion (Misc queries) 3 July 10th 07 05:06 PM
Removing an Addin from the Tools Addin list. Trefor Excel Programming 2 August 25th 06 04:45 PM
Unshimmed Automation Addin and Shimmed COM Addin in same App Domai Brandon Excel Programming 0 June 27th 06 11:18 PM
Remove Excel AddIn from AddIn List !! Help carl Excel Programming 2 December 8th 03 03:36 PM


All times are GMT +1. The time now is 10:10 PM.

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"