Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Menu and Form problems
In menu, can able to Pass parameter using "OnAction" ?
Set MenuItem = NewMenu.Controls.Add _ (Type:=msoControlButton) With MenuItem .Caption = "Build Japan" .FaceId = 0 .OnAction = "Process_frm_GEN (\""JAP\"")" <--- This coding not works .BeginGroup = True '~~ Separators in menu End With Sub Process_frm_GEN(loSite As String) MsgBox loSite End Sub Also, it is possible pass parameters to form ? I want change Form Caption and some value. Sub Process_frm_SIN() frmProcess_SIN.Show End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Menu and Form problems
Set MenuItem = NewMenu.Controls.Add _
(Type:=msoControlButton) With MenuItem .Caption = "Build Japan" .FaceId = 0 .OnAction = "Process_frm_GEN .Parameter = "JAP" .BeginGroup = True '~~ Separators in menu End With Sub Process_frm_GEN() With Application.Commandbars.ActionControl MsgBox .Parameter End With End Sub Also, it is possible pass parameters to form ? I want change Form Caption and some value. Sub Process_frm_SIN() frmProcess_SIN.Caption = "Test" frmProcess_SIN.Show End Sub -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "moonhk" wrote in message ups.com... In menu, can able to Pass parameter using "OnAction" ? Set MenuItem = NewMenu.Controls.Add _ (Type:=msoControlButton) With MenuItem .Caption = "Build Japan" .FaceId = 0 .OnAction = "Process_frm_GEN (\""JAP\"")" <--- This coding not works .BeginGroup = True '~~ Separators in menu End With Sub Process_frm_GEN(loSite As String) MsgBox loSite End Sub Also, it is possible pass parameters to form ? I want change Form Caption and some value. Sub Process_frm_SIN() frmProcess_SIN.Show End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Menu and Form problems
It works.
Bob Phillips wrote: Set MenuItem = NewMenu.Controls.Add _ (Type:=msoControlButton) With MenuItem .Caption = "Build Japan" .FaceId = 0 .OnAction = "Process_frm_GEN .Parameter = "JAP" .BeginGroup = True '~~ Separators in menu End With Sub Process_frm_GEN() With Application.Commandbars.ActionControl MsgBox .Parameter End With End Sub Also, it is possible pass parameters to form ? I want change Form Caption and some value. Sub Process_frm_SIN() frmProcess_SIN.Caption = "Test" frmProcess_SIN.Show End Sub -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "moonhk" wrote in message ups.com... In menu, can able to Pass parameter using "OnAction" ? Set MenuItem = NewMenu.Controls.Add _ (Type:=msoControlButton) With MenuItem .Caption = "Build Japan" .FaceId = 0 .OnAction = "Process_frm_GEN (\""JAP\"")" <--- This coding not works .BeginGroup = True '~~ Separators in menu End With Sub Process_frm_GEN(loSite As String) MsgBox loSite End Sub Also, it is possible pass parameters to form ? I want change Form Caption and some value. Sub Process_frm_SIN() frmProcess_SIN.Show End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 Add-ins Menu Problems | Setting up and Configuration of Excel | |||
Problems with Edit Menu | Setting up and Configuration of Excel | |||
Toolbar Menu problems | Excel Programming | |||
Custom menu problems | Excel Programming | |||
Problems with Excel 2003 Help menu | Excel Discussion (Misc queries) |