View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
Jody L. Whitlock Jody L. Whitlock is offline
external usenet poster
 
Posts: 14
Default Am I missing something???

bhofsetz wrote:


Jody,
What error are you getting now and on what line does it give you
the error?


Here's what I have come up with and works:

Public Sub Create_Menu()

Delete_Menu()

MenuObject =
applicationObject.CommandBars(1).Controls.Add(Type :=Office.MsoControlTyp
e.msoControlPopup, Befo=10)
MenuObject.Caption = "Ma&gic Metrics"

MyButton =
MenuObject.Controls.Add(Type:=Office.MsoControlTyp e.msoControlButton,
Temporary:=True)

With MyButton
.Caption = "Calculate Metrics"
.Visible = True
End With

End Sub
Public Sub Delete_Menu()
Try
applicationObject.CommandBars(1).Controls("Ma&gic
Metrics").Delete()
Catch ex As Exception
End Try
End Sub

Now, this is in VB.NET 2003, so I feel a little more warm and fuzzy in
life, but have generated myself a new problem. The reason for VB.NET?
RegEX! Otherwise, I have about 300 Select statements to write, I've
gotten about 1/3 of them done...
Anyhew, hopefully I will be able to figure out my new problem LOL

Thanks again, my solution was a colmunation of everything said in this
thread...

Jody W