Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.vb.winapi,microsoft.public.excel.programming
|
|||
|
|||
![]()
Has anyone ever managed to get a window handle for the sheet tabs control and
run SendMessage TCS_MULTILINE? SPY++ is surprisingly unhelpful: the EXCEL7 window for the active workbook has the expected scrollbars, and three XLCTL windows which I am unable to identify. None of them respond to SendMessage(hwndCtrl, TCS_MULTILINE, 0&, 0&) - actually, I'd be interested to know what these controls are... As for the reason I'm doing this, I have some workbooks here with 20 to 30 tabs, and the users want faster navigation. Yes, I could populate a menubar dynamically with navigation buttons for each worksheet in the current workbook, and dock it to the bottom of the XLDESK window. But I like lazy solutions. |
#2
![]()
Posted to microsoft.public.vb.winapi,microsoft.public.excel.programming
|
|||
|
|||
![]()
I doubt the sheet tabs are windows. Anyway, do your users know about the
built-in sheet list feature (right-click on one of the four little arrow heads in the lower left corner of the worksheet window)? -- Jim "Nile_Hef" wrote in message ... | Has anyone ever managed to get a window handle for the sheet tabs control and | run SendMessage TCS_MULTILINE? | | SPY++ is surprisingly unhelpful: the EXCEL7 window for the active workbook | has the expected scrollbars, and three XLCTL windows which I am unable to | identify. None of them respond to SendMessage(hwndCtrl, TCS_MULTILINE, 0&, | 0&) - actually, I'd be interested to know what these controls are... | | As for the reason I'm doing this, I have some workbooks here with 20 to 30 | tabs, and the users want faster navigation. Yes, I could populate a menubar | dynamically with navigation buttons for each worksheet in the current | workbook, and dock it to the bottom of the XLDESK window. But I like lazy | solutions. |
#3
![]()
Posted to microsoft.public.vb.winapi,microsoft.public.excel.programming
|
|||
|
|||
![]()
Ooh *SHINY!*
I didn't know about that menu. And if there's more than 16 sheets, clicking the 'More Sheets...' menu option opens the 'Activate' dialogue, which I can slip into the toolbar with this line of code: Application.Dialogs(xlDialogActivate).Show Thanks for that. NH "Jim Rech" wrote: I doubt the sheet tabs are windows. Anyway, do your users know about the built-in sheet list feature (right-click on one of the four little arrow heads in the lower left corner of the worksheet window)? -- Jim |
#4
![]()
Posted to microsoft.public.vb.winapi,microsoft.public.excel.programming
|
|||
|
|||
![]()
Nile_Hef schrieb:
SendMessage(hwndCtrl, TCS_MULTILINE, 0&, 0&) TCS_MULTILINE is a control style and no message. If you want to check whether it is set, you would have to use something like this: Dim style As Long style = GetWindowLong(hwndCtrl, GWL_STYLE) If style And TCS_MULTILINE Then Debug.Print "Control uses TCS_MULTILINE!" End If And if you want to set this style, do it like this: Dim style As Long style = GetWindowLong(hwndCtrl, GWL_STYLE) style = style Or TCS_MULTILINE SetWindowLong hwndCtrl, GWL_STYLE, style Timo -- www.TimoSoft-Software.de - the home of ExplorerTreeView Boycott DRM! Boycott HDCP! |
#5
![]()
Posted to microsoft.public.vb.winapi,microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for clarifying that: yes, I should be using SetWindowLong.
Unfortunately, the three XLCTL windows turn out to be resizing controls for the workbook scrollbars; the TabStrip control is well and truly hidden. Visible Excel objects are an odd mix of standard Windows components for exotic jobs and exotic handcrafted objects for commonplace Windows actions. Oh well: looks like I'll have to do some work... For people who value their time so much that a worksheet tab that's scrolled out of view is uneconomical to chase with the mouse. Nile __________________________________________________ ______________ "The Meek Shall Inherit The Earth. In very small plots, about six feet by three" "Timo Kunze" wrote: Nile_Hef schrieb: SendMessage(hwndCtrl, TCS_MULTILINE, 0&, 0&) TCS_MULTILINE is a control style and no message. If you want to check whether it is set, you would have to use something like this: Dim style As Long style = GetWindowLong(hwndCtrl, GWL_STYLE) If style And TCS_MULTILINE Then Debug.Print "Control uses TCS_MULTILINE!" End If And if you want to set this style, do it like this: Dim style As Long style = GetWindowLong(hwndCtrl, GWL_STYLE) style = style Or TCS_MULTILINE SetWindowLong hwndCtrl, GWL_STYLE, style Timo -- www.TimoSoft-Software.de - the home of ExplorerTreeView Boycott DRM! Boycott HDCP! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
tabs are missing even though 'tools-options-view-sheet tabs' ok? | Excel Worksheet Functions | |||
Help with data manipulation between 2 worksheet tabs | Excel Discussion (Misc queries) | |||
Time sheet manipulation | Excel Discussion (Misc queries) | |||
For better Performance in VBA for Excel - Strings manipulation OR Objects manipulation | Excel Programming | |||
Data manipulation within the same sheet | Setting up and Configuration of Excel |