Advertisement

07.05.2008 at 12:42PM PDT, ID: 23540961
[x]
Attachment Details

Calling a Function ith a String Name

Asked by Clemens_Saur in Microsoft Excel Spreadsheet Software, Visual Basic Programming

Tags: Microsoft, Excel, VBA 2003, VBA Excel

With a MenuBar I can call On Action via a String. As shown (Me.CodeName & ".Sheet_PMOfficeProjectRisks_Open_Current_Record")
>>>Set MB = Menu.Controls.Add(Type:=msoControlButton)
>>>With MB
>>>.Caption = "Open File @ Cursor"
>>>.Style = msoButtonCaption
>>>.OnAction = Me.CodeName & ".Sheet_PMOfficeProjectRisks_Open_Current_Record"
>>>End With

Now I would like to to the same when I call a Sub or a Function.
>>> Call Thisworkbook.worksheets(1).CodeName & ".Menu"

No can do. Any ideas?

Thanks

ClemensStart Free Trial
[+][-]07.05.2008 at 01:02PM PDT, ID: 21938166

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Excel Spreadsheet Software, Visual Basic Programming
Tags: Microsoft, Excel, VBA 2003, VBA Excel
Sign Up Now!
Solution Provided By: zorvek
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628