thanks Chip!
When you siad workbook name, do you mean the name of the work? Please see below on action code. I am still getting the error.
Private Sub Workbook_Open()
On Error Resume Next
Application.CommandBars("Worksheet Menu Bar").Controls("PO_DATA ANALYSIS MACRO").Delete
On Error GoTo 0
Dim wsmb As CommandBar
Dim myMen As CommandBarControl
Set wsmb = Application.CommandBars("Worksheet Menu Bar")
Set myMen = wsmb.Controls.Add(Type:=msoControlPopup, temporary:=True)
With myMen
.Caption = "PO_DATA ANALYSIS MACRO"
With .Controls.Add(msoControlButton)
.Caption = "PLAY"
.OnAction = "'" & PO_data_Current - Week.csv & "'! PO_Summary_Rpt "
' .OnAction = "PO_Summary_Rpt"
End With
' End With
End With
Chip Pearson wrote:
This should be.OnAction = "'" & ThisWorkbook.name & "'!
06-Nov-09
This should be
..OnAction = "'" & ThisWorkbook.name & "'!MacroName"
This tells Excel where to look for the procedure.
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
wrote:
Previous Posts In This Thread:
EggHeadCafe - Software Developer Portal of Choice
ASP.NET SqlCacheDependency Redux
http://www.eggheadcafe.com/tutorials...dependenc.aspx