Jaafar Tribak
Well-known Member
- Joined
- Dec 5, 2002
- Messages
- 9,818
- Office Version
- 2016
- Platform
- Windows
Hi all,
I have been experimenting with this rather unusual area and found some difficulties.
The code below successfully adds a Menu Bar to a UserForm.It then adds a PopUp Menu Item to it and Two SubMenu items to the newly created PopUp Menu item.
The Two SubMenu Items are supposed to display a simple MsgBox each upon clicking on them.
The problem I am having is that these MsgBoxes appear when hovering the Mouse Cursor over the Submenu Items instead of appearing when clicking on them.
Any suggestions on how I could fix this would be much appreciated.
Ah, another thing : I would love to add like a FaceId or another Graphic to the SubMenus as well but I have been unsuccessful so far.
Code in a Standard Module :
<font face=Courier New><SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Function</SPAN> FindWindow <SPAN style="color:#00007F">Lib</SPAN> "user32" Alias "FindWindowA" _
(<SPAN style="color:#00007F">ByVal</SPAN> lpClassName <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> lpWindowName <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN>) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Function</SPAN> CreateMenu <SPAN style="color:#00007F">Lib</SPAN> "user32" () <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Function</SPAN> CreatePopupMenu <SPAN style="color:#00007F">Lib</SPAN> "user32" () <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Function</SPAN> AppendMenu <SPAN style="color:#00007F">Lib</SPAN> "user32" Alias "AppendMenuA" _
(<SPAN style="color:#00007F">ByVal</SPAN> hMenu <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> wFlags <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> wIDNewItem <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> lpNewItem <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN>) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Function</SPAN> SetMenu <SPAN style="color:#00007F">Lib</SPAN> "user32" (<SPAN style="color:#00007F">ByVal</SPAN> hwnd <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> hMenu <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Function</SPAN> DestroyMenu <SPAN style="color:#00007F">Lib</SPAN> "user32" (<SPAN style="color:#00007F">ByVal</SPAN> hMenu <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Function</SPAN> SetWindowLong <SPAN style="color:#00007F">Lib</SPAN> "user32" Alias "SetWindow<SPAN style="color:#00007F">Long</SPAN>A" _
(<SPAN style="color:#00007F">ByVal</SPAN> hwnd <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> nIndex <SPAN style="color:#00007F">As</SPAN> Long, <SPAN style="color:#00007F">ByVal</SPAN> dwNew<SPAN style="color:#00007F">Long</SPAN> <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Function</SPAN> CallWindowProc Lib _
"user32" Alias "CallWindowProcA" (<SPAN style="color:#00007F">ByVal</SPAN> lpPrevWndFunc <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> hwnd <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, _
ByVal Msg <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> wParam <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> lParam <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Sub</SPAN> CopyMemory <SPAN style="color:#00007F">Lib</SPAN> "kernel32" Alias "RtlMoveMemory" _
(Destination <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Integer</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> Source <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, ByVal Length <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>)
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Const</SPAN> MF_POPUP = &H10
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Const</SPAN> MF_STRING = &H0
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Const</SPAN> WM_MENUSELECT = &H11F
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Const</SPAN> GWL_WNDPROC = -4
<SPAN style="color:#00007F">Public</SPAN> hForm <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Public</SPAN> hMenu <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Public</SPAN> hPopUpMenu <SPAN style="color:#00007F">As</SPAN> Long
<SPAN style="color:#00007F">Public</SPAN> lpPrevWndProc <SPAN style="color:#00007F">As</SPAN> Long
<SPAN style="color:#00007F">Public</SPAN> Rt <SPAN style="color:#00007F">As</SPAN> Long
<SPAN style="color:#007F00">' Get the PopUpMenu index stored in the low integer of wParam</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Function</SPAN> LOWORD(dw <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Integer</SPAN>
CopyMemory LOWORD, VarPtr(dw), 2
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Function</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Function</SPAN> CustomWinProc(<SPAN style="color:#00007F">ByVal</SPAN> hw <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> uMsg <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, _
ByVal wParam <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, ByVal lParam <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#007F00">' Catch the MenuSelect message and display MsgBoxes</SPAN>
<SPAN style="color:#00007F">If</SPAN> uMsg = WM_MENUSELECT And LOWORD(wParam) <> 0 <SPAN style="color:#00007F">Then</SPAN>
MsgBox "Hello ! You Selected PopUp " & LOWORD(wParam)
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
<SPAN style="color:#007F00">' Reroute all messages to native window procedure</SPAN>
CustomWinProc = CallWindowProc _
(lpPrevWndProc, hw, uMsg, wParam, lParam)
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Function</SPAN>
</FONT>
Code in the UserForm Class Module :
<font face=Courier New><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> UserForm_Initialize()
<SPAN style="color:#007F00">' Retrieve the Form Handle</SPAN>
hForm = FindWindow(vbNullString, Me.Caption)
<SPAN style="color:#007F00">' Create Menu and PopUp</SPAN>
hMenu = CreateMenu()
hPopUpMenu = CreatePopupMenu()
<SPAN style="color:#007F00">' Add Them To The Form</SPAN>
Rt = AppendMenu(hPopUpMenu, MF_STRING, 1, "PopUp 1")
Rt = AppendMenu(hPopUpMenu, MF_STRING, 2, "PopUp 2")
Rt = AppendMenu(hMenu, MF_POPUP, hPopUpMenu, "Jaafar")
Rt = SetMenu(hForm, hMenu)
<SPAN style="color:#007F00">' Subclass The Form</SPAN>
lpPrevWndProc = SetWindowLong(hForm, GWL_WNDPROC, AddressOf CustomWinProc)
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> UserForm_Terminate()
<SPAN style="color:#007F00">' Clean up</SPAN>
DestroyMenu hMenu
SetWindowLong hForm, GWL_WNDPROC, lpPrevWndProc
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
</FONT>
Regards.
I have been experimenting with this rather unusual area and found some difficulties.
The code below successfully adds a Menu Bar to a UserForm.It then adds a PopUp Menu Item to it and Two SubMenu items to the newly created PopUp Menu item.
The Two SubMenu Items are supposed to display a simple MsgBox each upon clicking on them.
The problem I am having is that these MsgBoxes appear when hovering the Mouse Cursor over the Submenu Items instead of appearing when clicking on them.
Any suggestions on how I could fix this would be much appreciated.
Ah, another thing : I would love to add like a FaceId or another Graphic to the SubMenus as well but I have been unsuccessful so far.
Code in a Standard Module :
<font face=Courier New><SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Function</SPAN> FindWindow <SPAN style="color:#00007F">Lib</SPAN> "user32" Alias "FindWindowA" _
(<SPAN style="color:#00007F">ByVal</SPAN> lpClassName <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> lpWindowName <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN>) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Function</SPAN> CreateMenu <SPAN style="color:#00007F">Lib</SPAN> "user32" () <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Function</SPAN> CreatePopupMenu <SPAN style="color:#00007F">Lib</SPAN> "user32" () <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Function</SPAN> AppendMenu <SPAN style="color:#00007F">Lib</SPAN> "user32" Alias "AppendMenuA" _
(<SPAN style="color:#00007F">ByVal</SPAN> hMenu <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> wFlags <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> wIDNewItem <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> lpNewItem <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN>) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Function</SPAN> SetMenu <SPAN style="color:#00007F">Lib</SPAN> "user32" (<SPAN style="color:#00007F">ByVal</SPAN> hwnd <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> hMenu <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Function</SPAN> DestroyMenu <SPAN style="color:#00007F">Lib</SPAN> "user32" (<SPAN style="color:#00007F">ByVal</SPAN> hMenu <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Function</SPAN> SetWindowLong <SPAN style="color:#00007F">Lib</SPAN> "user32" Alias "SetWindow<SPAN style="color:#00007F">Long</SPAN>A" _
(<SPAN style="color:#00007F">ByVal</SPAN> hwnd <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> nIndex <SPAN style="color:#00007F">As</SPAN> Long, <SPAN style="color:#00007F">ByVal</SPAN> dwNew<SPAN style="color:#00007F">Long</SPAN> <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Function</SPAN> CallWindowProc Lib _
"user32" Alias "CallWindowProcA" (<SPAN style="color:#00007F">ByVal</SPAN> lpPrevWndFunc <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> hwnd <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, _
ByVal Msg <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> wParam <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> lParam <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Declare</SPAN> <SPAN style="color:#00007F">Sub</SPAN> CopyMemory <SPAN style="color:#00007F">Lib</SPAN> "kernel32" Alias "RtlMoveMemory" _
(Destination <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Integer</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> Source <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, ByVal Length <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>)
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Const</SPAN> MF_POPUP = &H10
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Const</SPAN> MF_STRING = &H0
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Const</SPAN> WM_MENUSELECT = &H11F
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Const</SPAN> GWL_WNDPROC = -4
<SPAN style="color:#00007F">Public</SPAN> hForm <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Public</SPAN> hMenu <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Public</SPAN> hPopUpMenu <SPAN style="color:#00007F">As</SPAN> Long
<SPAN style="color:#00007F">Public</SPAN> lpPrevWndProc <SPAN style="color:#00007F">As</SPAN> Long
<SPAN style="color:#00007F">Public</SPAN> Rt <SPAN style="color:#00007F">As</SPAN> Long
<SPAN style="color:#007F00">' Get the PopUpMenu index stored in the low integer of wParam</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Function</SPAN> LOWORD(dw <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Integer</SPAN>
CopyMemory LOWORD, VarPtr(dw), 2
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Function</SPAN>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Function</SPAN> CustomWinProc(<SPAN style="color:#00007F">ByVal</SPAN> hw <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, <SPAN style="color:#00007F">ByVal</SPAN> uMsg <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, _
ByVal wParam <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, ByVal lParam <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#007F00">' Catch the MenuSelect message and display MsgBoxes</SPAN>
<SPAN style="color:#00007F">If</SPAN> uMsg = WM_MENUSELECT And LOWORD(wParam) <> 0 <SPAN style="color:#00007F">Then</SPAN>
MsgBox "Hello ! You Selected PopUp " & LOWORD(wParam)
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
<SPAN style="color:#007F00">' Reroute all messages to native window procedure</SPAN>
CustomWinProc = CallWindowProc _
(lpPrevWndProc, hw, uMsg, wParam, lParam)
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Function</SPAN>
</FONT>
Code in the UserForm Class Module :
<font face=Courier New><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> UserForm_Initialize()
<SPAN style="color:#007F00">' Retrieve the Form Handle</SPAN>
hForm = FindWindow(vbNullString, Me.Caption)
<SPAN style="color:#007F00">' Create Menu and PopUp</SPAN>
hMenu = CreateMenu()
hPopUpMenu = CreatePopupMenu()
<SPAN style="color:#007F00">' Add Them To The Form</SPAN>
Rt = AppendMenu(hPopUpMenu, MF_STRING, 1, "PopUp 1")
Rt = AppendMenu(hPopUpMenu, MF_STRING, 2, "PopUp 2")
Rt = AppendMenu(hMenu, MF_POPUP, hPopUpMenu, "Jaafar")
Rt = SetMenu(hForm, hMenu)
<SPAN style="color:#007F00">' Subclass The Form</SPAN>
lpPrevWndProc = SetWindowLong(hForm, GWL_WNDPROC, AddressOf CustomWinProc)
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> UserForm_Terminate()
<SPAN style="color:#007F00">' Clean up</SPAN>
DestroyMenu hMenu
SetWindowLong hForm, GWL_WNDPROC, lpPrevWndProc
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
</FONT>
Regards.