WorkSheet Class For The Findwindow API !

Jaafar Tribak

Well-known Member
Joined
Dec 5, 2002
Messages
9,822
Office Version
  1. 2016
Platform
  1. Windows
Hi all,

The Excel application object has the handy Hwnd property (Excel 2002) that returns the window handle of the Microsoft Excel window.

This is much easier than using the FindWindow Lib "user32" API Function which does the same job by returning the Excel main window Handle.

Question1

Is there a way of getting the Window handle for other objects like an Excel workbook window, a UserForm Window , an activeX Control window etc...by using a property similar to that of the Excel application ?

Question2

If the answer to the first question is no then is there an easy way of determining the exact class name that is required as a parameter for the FindWindow API Function ? Or is there another API Function that does that for you ?

I have seen a sample code that uses the FindWindow API Function to get the Excel application window handle.The first parameter of this function value is "XLMAIN".

I now want to get the WorkBook Window Handle using the same API Function in a similar way but I just can't figure out what the respective first parameter value is :banghead:

I have looked in the Windows Registry but without any luck.

I have tried :

Hwnd = FindWindow("excel.Sheets.9", ThisWorkbook.Windows(1).Caption)
Hwnd = FindWindow("excel.Sheet", Application.Windows(1).Caption)
and others but they all return 0 !!

Ultimately,what I want to do is get the window handle of a specific worksheet and trap the Events that Excel doesn't expose through VBA.

I would love to do the same with UserForms/Controls.

Hope I have expressed myself clearly and would appreciate any enlightning input from you.

Thanks.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hi Ivan,

I downloaded the workbook from your site and Woow !! It really is nice. :diablo:

When I move the Mouse over a worksheet in my workbook, the Form displays the following:

Window Handle= 131818

Class Name = EXCEL7

Window Text = Book1

However, when I run the code below ,the message Box displays 0 instead of 138818 !!! :huh:


<font face=Courier New><SPAN style="color:#00007F">Private</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">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> CommandButton1_Click()
    MsgBox FindWindow("EXCEL7", "Book1")
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
</FONT>


I don't know what I am doing wrong !

I am still very new to APIs. I have recently bought myself a couple of books on the subject which I find very exciting but it will definitely take some time before I digest all these new concepts.


By the way Ivan, the amount/quality of information in your website is great . :lol:

Thank you very much for making all that knowledge available.

Regards.
 
Upvote 0
OK the FindWindow function retrieves the handle to the top-level window whose class name
and window name match the specified strings. So in your code you have
Code:
Private Sub CommandButton1_Click()
    MsgBox FindWindow("EXCEL7", "Book1")
End Sub

Unfortunately this function does not search child windows of which EXCEL7 is !
EXCEL7 is actually not the Top window of the Applications thread, it is actually the
Class name to the Activeworkbooks window. As you are aware each Excel Application
can have many workbooks loaded and each one will have it's own Window (Sub window)
or child (ie. if you minimise this window you will see the books name and tabs etc.

The API Function you need to search child Windows is;

Code:
Declare Function FindWindowEx _
	Lib "user32" _
	Alias "FindWindowExA" ( _
	ByVal hWnd1 As Long, _
	ByVal hWnd2 As Long, _
	ByVal lpsz1 As String, _
	ByVal lpsz2 As String)  _
As Long

The FindWindowEx function retrieves the handle to a window whose class name and window
name match the specified strings. The function searches child windows, beginning with the
one following the given child window.

Parameters

· hwndParent
Identifies the parent window whose child windows are to be searched.
If hwndParent is NULL, the function uses the desktop window as the parent window. The function searches among windows that are child windows of the desktop.

· hwndChildAfter
Identifies a child window. The search begins with the next child window in the Z order. hwndChildAfter must be a direct child window of hwndParent, not just a descendant window.
If hwndChildAfter is NULL, the search begins with the first child window of hwndParent.
Note that if both hwndParent and hwndChildAfter are NULL, the function searches all top-level windows.

· lpszClass
Points to a null-terminated string that specifies the class name or is an atom that identifies the class-name string. If this parameter is an atom, it must be a global atom created by a previous call to the GlobalAddAtom function. The atom, a 16-bit value, must be placed in the low-order word of lpszClass; the high-order word must be zero.

· lpszWindow
Points to a null-terminated string that specifies the window name (the window’s title). If this parameter is NULL, all window names match.

This function is used, as Juan has kindly pointed out in;

http://www.xcelfiles.com/Excel01_01.html

Thanks again Juan :-)

Which Window were you looking @ getting ??....if it is one of the VBE Windows then you
can select your VBE and just hover over the Windows selecting certain ones that you know,
I did this and got the following...

<META content=Excel.Sheet name=ProgId><META content="Microsoft Excel 9" name=Generator><LINK href="./sht_files/filelist.xml" rel=File-List><STYLE id="Get ANY Handle Excel Obj_V1.0_26411_Styles"></STYLE>  <DIV id="Get ANY Handle Excel Obj_V1.0_26411" align='centerx:publishsource="Excel"'><TABLE style="TABLE-LAYOUT: fixed; WIDTH: 529pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=705 border=0 x:str><COLGROUP><COL style="WIDTH: 24pt; mso-width-source: userset; mso-width-alt: 1170" width=32><COL style="WIDTH: 79pt; mso-width-source: userset; mso-width-alt: 3840" width=105><COL style="WIDTH: 111pt; mso-width-source: userset; mso-width-alt: 5412" width=148><COL style="WIDTH: 292pt; mso-width-source: userset; mso-width-alt: 14226" width=389><COL style="WIDTH: 23pt; mso-width-source: userset; mso-width-alt: 1133" width=31><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="WIDTH: 24pt; HEIGHT: 12.75pt" width=32 height=17> </TD><TD class=xl3326411 style="WIDTH: 79pt" width=105> </TD><TD class=xl3326411 style="WIDTH: 111pt" width=148> </TD><TD class=xl3326411 style="WIDTH: 292pt" width=389> </TD><TD class=xl3326411 style="WIDTH: 23pt" width=31> </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl2426411>WindowHandle</TD><TD class=xl2426411>Class</TD><TD class=xl2426411>Textcaption</TD><TD class=xl3426411> </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl2726411 align=right x:num>526410</TD><TD class=xl2826411 x:str=" F3 Server 60000000 "><SPAN style="mso-spacerun: yes"> </SPAN>F3 Server 60000000 </TD><TD class=xl2926411><SPAN style="mso-spacerun: yes"> </SPAN></TD><TD class=xl3326411> </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl2526411 align=right x:num>5769032</TD><TD class=xl2526411 x:str=" ThunderDFrame "><SPAN style="mso-spacerun: yes"> </SPAN>ThunderDFrame </TD><TD class=xl2526411><SPAN style="mso-spacerun: yes"> </SPAN>Get Object Wndhnd & ClassNames</TD><TD class=xl3326411> </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl2726411 align=right x:num>1835312</TD><TD class=xl2826411 x:str=" EXCEL7 "><SPAN style="mso-spacerun: yes"> </SPAN>EXCEL7 </TD><TD class=xl2926411><SPAN style="mso-spacerun: yes"> </SPAN>Get ANY Handle Excel Obj_V1.0.xls</TD><TD class=xl3326411> </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl2526411 align=right x:num>1507974</TD><TD class=xl2526411 x:str=" XLDESK "><SPAN style="mso-spacerun: yes"> </SPAN>XLDESK </TD><TD class=xl2526411><SPAN style="mso-spacerun: yes"> </SPAN></TD><TD class=xl3326411> </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl2726411 align=right x:num>721744</TD><TD class=xl2826411 x:str=" MsoCommandBar "><SPAN style="mso-spacerun: yes"> </SPAN>MsoCommandBar </TD><TD class=xl2926411><SPAN style="mso-spacerun: yes"> </SPAN>Drawing</TD><TD class=xl3326411> </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl2526411 align=right x:num>2360030</TD><TD class=xl2526411 x:str=" MsoCommandBar "><SPAN style="mso-spacerun: yes"> </SPAN>MsoCommandBar </TD><TD class=xl2526411><SPAN style="mso-spacerun: yes"> </SPAN>Visual Basic</TD><TD class=xl3326411> </TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2726411 align=right x:num>1507974</TD><TD class=xl2826411 x:str=" XLDESK "><SPAN style="mso-spacerun: yes"> </SPAN>XLDESK </TD><TD class=xl2926411><SPAN style="mso-spacerun: yes"> </SPAN></TD><TD class=xl1526411></TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl2526411 align=right x:num>2163234</TD><TD class=xl2526411 x:str=" ScrollBar "><SPAN style="mso-spacerun: yes"> </SPAN>ScrollBar </TD><TD class=xl2526411><SPAN style="mso-spacerun: yes"> </SPAN></TD><TD class=xl3326411> </TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2726411 align=right x:num>1835312</TD><TD class=xl2826411 x:str=" EXCEL7 "><SPAN style="mso-spacerun: yes"> </SPAN>EXCEL7 </TD><TD class=xl2926411><SPAN style="mso-spacerun: yes"> </SPAN>Get ANY Handle Excel Obj_V1.0.xls</TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2526411 align=right x:num>2163234</TD><TD class=xl2526411 x:str=" ScrollBar "><SPAN style="mso-spacerun: yes"> </SPAN>ScrollBar </TD><TD class=xl2526411><SPAN style="mso-spacerun: yes"> </SPAN></TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2726411 align=right x:num>1507974</TD><TD class=xl2826411 x:str=" XLDESK "><SPAN style="mso-spacerun: yes"> </SPAN>XLDESK </TD><TD class=xl2926411><SPAN style="mso-spacerun: yes"> </SPAN></TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2526411 align=right x:num>2360030</TD><TD class=xl2526411 x:str=" MsoCommandBar "><SPAN style="mso-spacerun: yes"> </SPAN>MsoCommandBar </TD><TD class=xl2526411><SPAN style="mso-spacerun: yes"> </SPAN>Visual Basic</TD><TD class=xl1526411></TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl3026411 align=right x:num>1378126</TD><TD class=xl3126411 x:str=" VbaWindow "><SPAN style="mso-spacerun: yes"> </SPAN>VbaWindow </TD><TD class=xl3226411><SPAN style="mso-spacerun: yes"> </SPAN>Module1 (Code)</TD><TD class=xl3326411> </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl2626411 align=right x:num>591798</TD><TD class=xl2626411 x:str=" ComboBox "><SPAN style="mso-spacerun: yes"> </SPAN>ComboBox </TD><TD class=xl2626411><SPAN style="mso-spacerun: yes"> </SPAN>(General)</TD><TD class=xl3326411> </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl3026411 align=right x:num>264332</TD><TD class=xl3126411 x:str=" VBSlider "><SPAN style="mso-spacerun: yes"> </SPAN>VBSlider </TD><TD class=xl3226411><SPAN style="mso-spacerun: yes"> </SPAN></TD><TD class=xl3326411> </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl2626411 align=right x:num="9962240">9962240</TD><TD class=xl2626411 x:str=" SysTreeView32 "><SPAN style="mso-spacerun: yes"> </SPAN>SysTreeView32 </TD><TD class=xl2626411><SPAN style="mso-spacerun: yes"> </SPAN></TD><TD class=xl3326411> </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl3026411 align=right x:num>329858</TD><TD class=xl3126411 x:str=" VBSlider "><SPAN style="mso-spacerun: yes"> </SPAN>VBSlider </TD><TD class=xl3226411><SPAN style="mso-spacerun: yes"> </SPAN></TD><TD class=xl3326411> </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl2626411 align=right x:num>1639356</TD><TD class=xl2626411 x:str=" wndclass_pbrs "><SPAN style="mso-spacerun: yes"> </SPAN>wndclass_pbrs </TD><TD class=xl2626411><SPAN style="mso-spacerun: yes"> </SPAN>Properties - Module1</TD><TD class=xl3326411> </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl3026411 align=right x:num>1114882</TD><TD class=xl3126411 x:str=" ListBox "><SPAN style="mso-spacerun: yes"> </SPAN>ListBox </TD><TD class=xl3226411><SPAN style="mso-spacerun: yes"> </SPAN></TD><TD class=xl3326411> </TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2526411 align=right x:num>1639356</TD><TD class=xl2526411 x:str=" wndclass_pbrs "><SPAN style="mso-spacerun: yes"> </SPAN>wndclass_pbrs </TD><TD class=xl2526411><SPAN style="mso-spacerun: yes"> </SPAN>Properties - Module1</TD><TD class=xl1526411></TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl3026411 align=right x:num>1245986</TD><TD class=xl3126411 x:str=" SysTabControl32 "><SPAN style="mso-spacerun: yes"> </SPAN>SysTabControl32 </TD><TD class=xl3226411><SPAN style="mso-spacerun: yes"> </SPAN></TD><TD class=xl3326411> </TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2526411 align=right x:num>1639356</TD><TD class=xl2526411 x:str=" wndclass_pbrs "><SPAN style="mso-spacerun: yes"> </SPAN>wndclass_pbrs </TD><TD class=xl2526411><SPAN style="mso-spacerun: yes"> </SPAN>Properties - Module1</TD><TD class=xl1526411></TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl3026411 align=right x:num>394056</TD><TD class=xl3126411 x:str=" ComboBox "><SPAN style="mso-spacerun: yes"> </SPAN>ComboBox </TD><TD class=xl3226411><SPAN style="mso-spacerun: yes"> </SPAN>Module1</TD><TD class=xl3326411> </TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2526411 align=right x:num>1639356</TD><TD class=xl2526411 x:str=" wndclass_pbrs "><SPAN style="mso-spacerun: yes"> </SPAN>wndclass_pbrs </TD><TD class=xl2526411><SPAN style="mso-spacerun: yes"> </SPAN>Properties - Module1</TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2726411 align=right x:num>329858</TD><TD class=xl2826411 x:str=" VBSlider "><SPAN style="mso-spacerun: yes"> </SPAN>VBSlider </TD><TD class=xl2926411><SPAN style="mso-spacerun: yes"> </SPAN></TD><TD class=xl1526411></TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl2626411 align=right x:num>1573674</TD><TD class=xl2626411 x:str=" PROJECT "><SPAN style="mso-spacerun: yes"> </SPAN>PROJECT </TD><TD class=xl2626411><SPAN style="mso-spacerun: yes"> </SPAN>Project - VBAProject</TD><TD class=xl3326411> </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl3026411 align=right x:num>1639382</TD><TD class=xl3126411 x:str=" MsoCommandBar "><SPAN style="mso-spacerun: yes"> </SPAN>MsoCommandBar </TD><TD class=xl3226411><SPAN style="mso-spacerun: yes"> </SPAN>Project Window</TD><TD class=xl3326411> </TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2526411 align=right x:num="9962240">9962240</TD><TD class=xl2526411 x:str=" SysTreeView32 "><SPAN style="mso-spacerun: yes"> </SPAN>SysTreeView32 </TD><TD class=xl2526411><SPAN style="mso-spacerun: yes"> </SPAN></TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2726411 align=right x:num>264332</TD><TD class=xl2826411 x:str=" VBSlider "><SPAN style="mso-spacerun: yes"> </SPAN>VBSlider </TD><TD class=xl2926411><SPAN style="mso-spacerun: yes"> </SPAN></TD><TD class=xl1526411></TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl2626411 align=right x:num>393928</TD><TD class=xl2626411 x:str=" MDIClient "><SPAN style="mso-spacerun: yes"> </SPAN>MDIClient </TD><TD class=xl2626411><SPAN style="mso-spacerun: yes"> </SPAN></TD><TD class=xl3326411> </TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2726411 align=right x:num>1378126</TD><TD class=xl2826411 x:str=" VbaWindow "><SPAN style="mso-spacerun: yes"> </SPAN>VbaWindow </TD><TD class=xl2926411><SPAN style="mso-spacerun: yes"> </SPAN>Module1 (Code)</TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2526411 align=right x:num>591798</TD><TD class=xl2526411 x:str=" ComboBox "><SPAN style="mso-spacerun: yes"> </SPAN>ComboBox </TD><TD class=xl2526411><SPAN style="mso-spacerun: yes"> </SPAN>(General)</TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2726411 align=right x:num>1378126</TD><TD class=xl2826411 x:str=" VbaWindow "><SPAN style="mso-spacerun: yes"> </SPAN>VbaWindow </TD><TD class=xl2926411><SPAN style="mso-spacerun: yes"> </SPAN>Module1 (Code)</TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2526411 align=right x:num>591798</TD><TD class=xl2526411 x:str=" ComboBox "><SPAN style="mso-spacerun: yes"> </SPAN>ComboBox </TD><TD class=xl2526411><SPAN style="mso-spacerun: yes"> </SPAN>(General)</TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2726411 align=right x:num="9962240">9962240</TD><TD class=xl2826411 x:str=" SysTreeView32 "><SPAN style="mso-spacerun: yes"> </SPAN>SysTreeView32 </TD><TD class=xl2926411><SPAN style="mso-spacerun: yes"> </SPAN></TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2526411 align=right x:num>1639382</TD><TD class=xl2526411 x:str=" MsoCommandBar "><SPAN style="mso-spacerun: yes"> </SPAN>MsoCommandBar </TD><TD class=xl2526411><SPAN style="mso-spacerun: yes"> </SPAN>Project Window</TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2726411 align=right x:num>1573674</TD><TD class=xl2826411 x:str=" PROJECT "><SPAN style="mso-spacerun: yes"> </SPAN>PROJECT </TD><TD class=xl2926411><SPAN style="mso-spacerun: yes"> </SPAN>Project - VBAProject</TD><TD class=xl1526411></TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl2626411 align=right x:num>329836</TD><TD class=xl2626411 x:str=" MsoCommandBar "><SPAN style="mso-spacerun: yes"> </SPAN>MsoCommandBar </TD><TD class=xl2626411><SPAN style="mso-spacerun: yes"> </SPAN>Edit</TD><TD class=xl3326411> </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl3026411 align=right x:num>591994</TD><TD class=xl3126411 x:str=" MsoCommandBar "><SPAN style="mso-spacerun: yes"> </SPAN>MsoCommandBar </TD><TD class=xl3226411><SPAN style="mso-spacerun: yes"> </SPAN>Standard</TD><TD class=xl3326411> </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl2626411 align=right x:num>591956</TD><TD class=xl2626411 x:str=" MsoCommandBar "><SPAN style="mso-spacerun: yes"> </SPAN>MsoCommandBar </TD><TD class=xl2626411><SPAN style="mso-spacerun: yes"> </SPAN>Menu Bar</TD><TD class=xl3326411> </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl3026411 align=right x:num>11862938</TD><TD class=xl3126411 x:str=" wndclass_desked_gsk "><SPAN style="mso-spacerun: yes"> </SPAN>wndclass_desked_gsk </TD><TD class=xl3226411><SPAN style="mso-spacerun: yes"> </SPAN>Microsoft Visual Basic - cbars2.xls [running] - [Module1 (Code)]</TD><TD class=xl3326411> </TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2526411 align=right x:num>591956</TD><TD class=xl2526411 x:str=" MsoCommandBar "><SPAN style="mso-spacerun: yes"> </SPAN>MsoCommandBar </TD><TD class=xl2526411><SPAN style="mso-spacerun: yes"> </SPAN>Menu Bar</TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2726411 align=right x:num>591994</TD><TD class=xl2826411 x:str=" MsoCommandBar "><SPAN style="mso-spacerun: yes"> </SPAN>MsoCommandBar </TD><TD class=xl2926411><SPAN style="mso-spacerun: yes"> </SPAN>Standard</TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2526411 align=right x:num>329836</TD><TD class=xl2526411 x:str=" MsoCommandBar "><SPAN style="mso-spacerun: yes"> </SPAN>MsoCommandBar </TD><TD class=xl2526411><SPAN style="mso-spacerun: yes"> </SPAN>Edit</TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2726411 align=right x:num>1573674</TD><TD class=xl2826411 x:str=" PROJECT "><SPAN style="mso-spacerun: yes"> </SPAN>PROJECT </TD><TD class=xl2926411><SPAN style="mso-spacerun: yes"> </SPAN>Project - VBAProject</TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2526411 align=right x:num>1639382</TD><TD class=xl2526411 x:str=" MsoCommandBar "><SPAN style="mso-spacerun: yes"> </SPAN>MsoCommandBar </TD><TD class=xl2526411><SPAN style="mso-spacerun: yes"> </SPAN>Project Window</TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2726411 align=right x:num>1573674</TD><TD class=xl2826411 x:str=" PROJECT "><SPAN style="mso-spacerun: yes"> </SPAN>PROJECT </TD><TD class=xl2926411><SPAN style="mso-spacerun: yes"> </SPAN>Project - VBAProject</TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2526411 align=right x:num>1639382</TD><TD class=xl2526411 x:str=" MsoCommandBar "><SPAN style="mso-spacerun: yes"> </SPAN>MsoCommandBar </TD><TD class=xl2526411><SPAN style="mso-spacerun: yes"> </SPAN>Project Window</TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2726411 align=right x:num>1573674</TD><TD class=xl2826411 x:str=" PROJECT "><SPAN style="mso-spacerun: yes"> </SPAN>PROJECT </TD><TD class=xl2926411><SPAN style="mso-spacerun: yes"> </SPAN>Project - VBAProject</TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2526411 align=right x:num="9962240">9962240</TD><TD class=xl2526411 x:str=" SysTreeView32 "><SPAN style="mso-spacerun: yes"> </SPAN>SysTreeView32 </TD><TD class=xl2526411><SPAN style="mso-spacerun: yes"> </SPAN></TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2726411 align=right x:num>264332</TD><TD class=xl2826411 x:str=" VBSlider "><SPAN style="mso-spacerun: yes"> </SPAN>VBSlider </TD><TD class=xl2926411><SPAN style="mso-spacerun: yes"> </SPAN></TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2526411 align=right x:num>1378126</TD><TD class=xl2526411 x:str=" VbaWindow "><SPAN style="mso-spacerun: yes"> </SPAN>VbaWindow </TD><TD class=xl2526411><SPAN style="mso-spacerun: yes"> </SPAN>Module1 (Code)</TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2726411 align=right x:num>591798</TD><TD class=xl2826411 x:str=" ComboBox "><SPAN style="mso-spacerun: yes"> </SPAN>ComboBox </TD><TD class=xl2926411><SPAN style="mso-spacerun: yes"> </SPAN>(General)</TD><TD class=xl1526411></TD></TR><TR style="DISPLAY: none" height=0><TD class=xl1526411></TD><TD class=xl2526411 align=right x:num>1378126</TD><TD class=xl2526411 x:str=" VbaWindow "><SPAN style="mso-spacerun: yes"> </SPAN>VbaWindow </TD><TD class=xl2526411><SPAN style="mso-spacerun: yes"> </SPAN>Module1 (Code)</TD><TD class=xl1526411></TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl3026411 align=right x:num>1509224</TD><TD class=xl3126411 x:str=" ScrollBar "><SPAN style="mso-spacerun: yes"> </SPAN>ScrollBar </TD><TD class=xl3226411><SPAN style="mso-spacerun: yes"> </SPAN></TD><TD class=xl3326411> </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl3326411 style="HEIGHT: 12.75pt" height=17> </TD><TD class=xl3326411> </TD><TD class=xl3326411> </TD><TD class=xl3326411><SPAN style="mso-spacerun: yes"> </SPAN></TD><TD class=xl3326411> </TD></TR></TBODY></TABLE></DIV>

The Red being from the VBE
 
Upvote 0

Forum statistics

Threads
1,225,474
Messages
6,185,192
Members
453,282
Latest member
roger_nz66

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top