Solved

VB6 TabStrip control lacks BackColor property

Posted on 2011-09-06
4
1,749 Views
Last Modified: 2012-05-12
How does one change background property for TabStrip OCX. Solution to the original question points to http://www.elitevb.com/content/01,0042,01/ , which is now not available. Does anyone have a copy?

Answer to this question http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_21634250.html
utilizes subclassing, is there any other way, say, sending a message?
0
Comment
Question by:anesk
4 Comments
 
LVL 15

Expert Comment

by:gplana
Comment Utility
If what you want is to change the color of the tabs themselves rather than the background of the control then I am afraid that you cannot do this. If you use the SSTab control from VB6 SP4 update then it is possible to assign bitmap images to the tabs which can simulate a background color for the tab. However you have to also include the text for the caption within the bitmap.
0
 
LVL 14

Expert Comment

by:Brook Braswell
Comment Utility
Similar to what gplana mentions, I normally place a frame control on top of each tab and then I can set the Color as I see fit and all objects fit nicely on the frame.
0
 
LVL 6

Accepted Solution

by:
judgeking earned 500 total points
Comment Utility
I've found a copy of the solution, I'll post the code here so there's no dead links in the future.  I've tested it, it works.
'Project1.vbp
Type=Exe
Form=Form1.frm
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINNT\System32\stdole2.tlb#OLE Automation
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; Mscomctl.ocx
Module=modTabStrip; modTabStrip.bas
Module=Module1; Module1.bas
IconForm="Form1"
Startup="Form1"
HelpFile=""
Title="Project1"
Command32=""
Name="Project1"
HelpContextID="0"
CompatibleMode="0"
MajorVer=1
MinorVer=0
RevisionVer=0
AutoIncrementVer=0
ServerSupportFiles=0
VersionComments="a demonstration of ownerdrawn tabstrips and changing a tabstrip's background color"
VersionCompanyName="EliteVB.com"
VersionLegalCopyright="(c) 2002, EliteVB.com"
CompilationType=0
OptimizationType=0
FavorPentiumPro(tm)=0
CodeViewDebugInfo=0
NoAliasing=0
BoundsCheck=0
OverflowCheck=0
FlPointCheck=0
FDIVCheck=0
UnroundedFP=0
StartMode=0
Unattended=0
Retained=0
ThreadPerObject=0
MaxNumberOfThreads=1

Open in new window

'Form1.frm
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "Mscomctl.ocx"
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   1425
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   1425
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command1 
      Caption         =   "Open new"
      Height          =   285
      Left            =   3630
      TabIndex        =   2
      Top             =   1110
      Width           =   945
   End
   Begin VB.TextBox txtExample 
      Height          =   615
      Left            =   270
      MultiLine       =   -1  'True
      TabIndex        =   1
      Text            =   "Form1.frx":0000
      Top             =   210
      Width           =   4155
   End
   Begin MSComctlLib.TabStrip tbsPage 
      Height          =   1215
      Left            =   90
      TabIndex        =   0
      Top             =   90
      Width           =   4485
      _ExtentX        =   7911
      _ExtentY        =   2143
      TabWidthStyle   =   1
      MultiRow        =   -1  'True
      TabFixedHeight  =   591
      Placement       =   1
      _Version        =   393216
      BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628} 
         NumTabs         =   4
         BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "Page 1"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab2 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "Page 2"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab3 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "Page 3"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab4 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "Page 4"
            ImageVarType    =   2
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'
' Owner draw state.
'
Private Const ODS_SELECTED = &H1
Private Const ODS_GRAYED = &H2
Private Const ODS_DISABLED = &H4
Private Const ODS_CHECKED = &H8
Private Const ODS_FOCUS = &H10
Private Const ODS_DEFAULT = &H20
Private Const ODS_COMBOBOXEDIT = &H1000
Private Const ODS_HOTLIGHT = &H40
Private Const ODS_INACTIVE = &H80

' A rectangle. DUH!
Private Type RECT
    left As Long
    top As Long
    right As Long
    bottom As Long
End Type

' A point type
Private Type POINTAPI
    x As Long
    Y As Long
End Type

' A draw item structure type for OD Controls
Private Type DRAWITEMSTRUCT
    CtlType As Long
    CtlID As Long
    itemID As Long
    itemAction As Long
    itemState As Long
    hwndItem As Long
    hdc As Long
    rcItem As RECT
    ItemData As Long
End Type

' A Tabstrip control item structure
Private Type TCITEM
    mask As Long
    dwState As Long
    dwStateMask As Long
    pszText As Long
    cchTextMax As Long
    iImage As Long
    lParam As Long
End Type

' A tabstrip control information constant
Private Const TCIF_TEXT = &H1

' Messages to send to a Tabstrip control to retrieve information
Private Const TCM_FIRST = &H1300
Private Const TCM_GETCURSEL = (TCM_FIRST + 11)
Private Const TCM_GETITEMA = (TCM_FIRST + 5)
Private Const TCM_GETITEM = TCM_GETITEMA

' A null/hollow brush... lets us create a hollow rectangle
Private Const NULL_BRUSH As Long = 5

' CreatePen() API constants
Private Const PS_SOLID As Long = 0
Private Const PS_DASH As Long = 1
Private Const PS_DASHDOT As Long = 3
Private Const PS_DASHDOTDOT As Long = 4
Private Const PS_DOT As Long = 2

' DrawText() API constants
Private Const DT_LEFT As Long = &H0
Private Const DT_CENTER As Long = &H1
Private Const DT_RIGHT As Long = &H2
Private Const DT_TOP As Long = &H0
Private Const DT_BOTTOM As Long = &H8
Private Const DT_VCENTER As Long = &H4
Private Const DT_WORDBREAK = &H10
Private Const DT_MULTILINE As Long = (&H1)
Private Const DT_SINGLELINE As Long = &H20
Private Const DT_CALCRECT As Long = &H400

' ********************************************************************************
'  GDI32 stuff
' ********************************************************************************
Private Declare Function CreateCompatibleBitmap Lib "gdi32" (ByVal hdc As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
Private Declare Function CreateCompatibleDC Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function CreatePen Lib "gdi32" (ByVal nPenStyle As Long, ByVal nWidth As Long, ByVal crColor As Long) As Long
Private Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private Declare Function DeleteDC Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function DrawFocusRect Lib "user32" (ByVal hdc As Long, lpRect As RECT) As Long
Private Declare Function DrawText Lib "user32" Alias "DrawTextA" (ByVal hdc As Long, ByVal lpStr As String, ByVal nCount As Long, lpRect As RECT, ByVal wFormat As Long) As Long
Private Declare Function FillRect Lib "user32" (ByVal hdc As Long, lpRect As RECT, ByVal hBrush As Long) As Long
Private Declare Function GetStockObject Lib "gdi32" (ByVal nIndex As Long) As Long
Private Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long
Private Declare Function SetTextColor Lib "gdi32" (ByVal hdc As Long, ByVal crColor As Long) As Long
Private Declare Function SetBkColor Lib "gdi32" (ByVal hdc As Long, ByVal crColor As Long) As Long
Private Declare Function SetBkMode Lib "gdi32" (ByVal hdc As Long, ByVal nBkMode As Long) As Long
Private Declare Function Rectangle Lib "gdi32" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long

' Used to store the original procedure addresses by individual window handle
Private Declare Function GetProp Lib "user32" Alias "GetPropA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Private Declare Function SetProp Lib "user32" Alias "SetPropA" (ByVal hwnd As Long, ByVal lpString As String, ByVal hData As Long) As Long
Private Declare Function RemoveProp Lib "user32" Alias "RemovePropA" (ByVal hwnd As Long, ByVal lpString As String) As Long

' Miscellaneous API functions for manipulating the types and retrieving information
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As Any, pSrc As Any, ByVal ByteLen As Long)
Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Long, ByVal msg As Long, ByVal wParam As Long, lParam As Any) As Long



Friend Sub DrawTabItem(ByVal hwnd As Long, ByVal drawInfoPtr As Long)

    Dim aDIS        As DRAWITEMSTRUCT   ' A OD draw item structure
    Dim aTCItem     As TCITEM           ' a Tabstrip control item structure
    Dim abrush      As Long             ' a temporary brush object for filling areas with color
    Dim aStr        As String           ' temporary variable for converting caption text from unicode
    Dim aStrByte()  As Byte             ' a byte buffer for storing the caption string (unicode)
    Dim aPen        As Long             ' a temporary pen item for drawing the border color
    Dim origPen     As Long             ' original pen for the DIS.hDC property
    
    ' Make sure that the hwnd and drawInfo pointers are valid
    If hwnd = 0 Or drawInfoPtr = 0 Then Exit Sub
    
    ' Copy information from our pointer address into the DrawItem structure
    CopyMemory aDIS, ByVal drawInfoPtr, Len(aDIS)
            
    With aDIS
        ' If the item is the "selected" tab, we're gonna do a bunch of
        '  stuff to it.
        If ((aDIS.itemState And ODS_SELECTED) = ODS_SELECTED) Then
            ' Create a brush the color of "mainTabstrip"
            abrush = CreateSolidBrush(getAppColor("mainTabstrip"))
            ' Fill in the whole tab caption area with "mainTabstrip" color first
            FillRect .hdc, .rcItem, abrush
            ' clean up our brush resource
            DeleteObject abrush
            ' adjust the "top" of our painting area down 2 pixels
            .rcItem.top = .rcItem.top + 2
            ' create another brush the "selected" color
            abrush = CreateSolidBrush(getAppColor("Selected"))
            ' fill in the area
            FillRect .hdc, .rcItem, abrush
            ' clean up our brush resource
            DeleteObject abrush
            ' create a new pen of color "BorderColor" and select it into our device context
            origPen = SelectObject(.hdc, CreatePen(0, 1, getAppColor("BorderColor")))
            ' create a hollow brush and select it into the device context
            abrush = SelectObject(.hdc, GetStockObject(NULL_BRUSH))
            ' draw our rectange of color "BorderColor"
            Rectangle .hdc, .rcItem.left + 3, .rcItem.top + 1, .rcItem.right - 3, .rcItem.bottom - 3
            ' replace the original pen object and delete our pen of color "BorderColor"
            DeleteObject SelectObject(.hdc, origPen)
            ' replace the original brush
            SelectObject .hdc, abrush
            ' adjust the "top" of the item down a little more (2 more pixels)
            .rcItem.top = .rcItem.top + 2
        Else
            ' We're just going to fill in everything with the appropriate color
            abrush = CreateSolidBrush(getAppColor("mainTabstrip"))
            .rcItem.top = .rcItem.top - 2
            FillRect .hdc, .rcItem, abrush
            DeleteObject abrush
        End If
        ' Set which information we want to retrieve
        aTCItem.mask = TCIF_TEXT
        ' Create a buffer for our caption
        ReDim aStrByte(0 To 127)
        ' set a pointer to our string buffer
        aTCItem.pszText = VarPtr(aStrByte(0))
        ' set the size of our buffer
        aTCItem.cchTextMax = UBound(aStrByte)
        ' get the tab caption information
        SendMessage tbsPage.hwnd, TCM_GETITEM, aDIS.itemID, aTCItem
        ' Convert the caption from unicode to a regular string
        aStr = StrConv(aStrByte(), vbUnicode)
        ' trim out the null characters
        aStr = VBA.left$(aStr, InStr(aStr, Chr$(0)) - 1)
        ' Set our text color to the right color (either "SelectedText" or "GeneralText")
        SetTextColor .hdc, IIf(aDIS.itemState And ODS_SELECTED, getAppColor("SelectedText"), getAppColor("GeneralText"))
        ' Make the text print transparently
        SetBkMode .hdc, 1
        ' Draw the caption text
        DrawText .hdc, aStr, Len(aStr), .rcItem, DT_VCENTER Or DT_CENTER
    End With

End Sub

Private Sub Command1_Click()
    Dim aform As Form1
    Set aform = New Form1
    aform.Show
    Set aform = Nothing
End Sub

Private Sub Form_Load()
    ' Change the background color of the form
    Me.BackColor = getAppColor("formbackground")
    ' Start subclassing!
    modTabStrip.subclassTabStrip tbsPage
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    ' Unsubclass!!!
    unsubclassTabstrip tbsPage
End Sub

Open in new window

'modTabStrip.bas
Attribute VB_Name = "modTabStrip"
Option Explicit

Private Const WM_DRAWITEM = &H2B
Private Const WM_PRINTCLIENT = &H318
Private Const GWL_WNDPROC = (-4)
Private Const GWL_STYLE = (-16)
Private Const GWL_EXSTYLE = (-20)

' A rectangle! Imagine that!
Private Type RECT
   left                 As Long
   top                  As Long
   right                As Long
   bottom               As Long
End Type

' Ownerdrawn TabStrip style.
Private Const TCS_OWNERDRAWFIXED = &H2000

' **************************************************************************
' GDI32 API Functions used for changing the background color of the tabstrip
' **************************************************************************
Private Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private Declare Function FillRect Lib "user32" (ByVal hdc As Long, lpRect As RECT, ByVal hBrush As Long) As Long
Private Declare Function GetClientRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
' **************************************************************************
' Used to subclass the tabstrip and its parent
' **************************************************************************
Private Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hwnd As Long, ByVal msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetProp Lib "user32" Alias "GetPropA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Private Declare Function RemoveProp Lib "user32" Alias "RemovePropA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Private Declare Function SetProp Lib "user32" Alias "SetPropA" (ByVal hwnd As Long, ByVal lpString As String, ByVal hData As Long) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
' **************************************************************************
' Used for our slimy pointer hack for the "safe" subclassing method
' **************************************************************************
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As Any, pSrc As Any, ByVal ByteLen As Long)

Public Function subclassTabStrip(aTabstrip As TabStrip)

    Dim origProc As Long        ' Original process address
    Dim aStyle As Long          ' Original style for the tabstrip
    
' Set the OwnerDrawn style
    
    ' get the original style
    aStyle = GetWindowLong(aTabstrip.hwnd, GWL_STYLE)
    ' add in the ownerdrawn style
    aStyle = aStyle Or TCS_OWNERDRAWFIXED
    ' replace the style with our "ownerdrawn" one
    SetWindowLong aTabstrip.hwnd, GWL_STYLE, aStyle
    
' subclass the tabstrip - used to change the background color of the tabstrip
    
    ' Redirect our messages to the function "TabStripProc"
    origProc = SetWindowLong(aTabstrip.hwnd, GWL_WNDPROC, AddressOf TabStripProc)
    ' Store the original process address against the tabstrip's handle
    SetProp aTabstrip.hwnd, "OrigTabStripProc", origProc
    ' Store a "tabheight" value so we can make the tab background a different color
    '  than the rest of the tabstrip control (want the tab backgrounds, i.e. the
    '  parts that aren't really tabs to be the same color as the form)
    SetProp aTabstrip.hwnd, "TabHeight", aTabstrip.TabFixedHeight / Screen.TwipsPerPixelY

' subclass the parent - used to capture the WM_DRAWITEM message
    
    ' Redirect our messages for the tabstrip's parent to "TabStripOwnerProc"
    origProc = SetWindowLong(GetParent(aTabstrip.hwnd), GWL_WNDPROC, AddressOf TabStripOwnerProc)
    ' Store the original window process's address against its handle (we're assuming
    '  only in name that its owner is a form - it could be a picturebox or something)
    SetProp GetParent(aTabstrip.hwnd), "OrigWindowProc", origProc
    ' Store a pointer to the tabstrip's form so we can implement our slimy hack
    '  "safe" subclassing method
    SetProp GetParent(aTabstrip.hwnd), "ODFormHwnd", ObjPtr(aTabstrip.Parent)

End Function
Public Function unsubclassTabstrip(aTabstrip As TabStrip)
    Dim origProc As Long
    
'Unsubclass the parent

    ' Get the original process address for the tabstrip's parent
    origProc = GetProp(GetParent(aTabstrip.hwnd), "OrigWindowProc")
    ' Redirect all messages back to this parent
    SetWindowLong GetParent(aTabstrip.hwnd), GWL_WNDPROC, origProc
    ' Remove the entries from windows' internal database
    RemoveProp GetParent(aTabstrip.hwnd), "OrigWindowProc"
    RemoveProp GetParent(aTabstrip.hwnd), "ODFormHwnd"

'unsubclass the tabstrip
    
    ' Get the original process for the tabstrip
    origProc = GetProp(aTabstrip.hwnd, "OrigTabStripProc")
    ' Redirect all messages back to its original process
    SetWindowLong aTabstrip.hwnd, GWL_WNDPROC, origProc
    ' Remove the entries from windows' internal database
    RemoveProp aTabstrip.hwnd, "OrigTabStripProc"
    RemoveProp aTabstrip.hwnd, "TabHeight"
    
End Function

Private Function TabStripProc(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
    
    Dim oldWndProc      As Long     ' Original process address for the tabstrip
    Dim aRect           As RECT     ' Rectangle structure for drawing and filling with colors
    Dim abrush          As Long     ' brush object for filling with colors
    Dim aTabHeight      As Long     ' height of the tab items
    
    ' Get the original tabstrip process address
    oldWndProc = GetProp(hwnd, "OrigTabStripProc")
    
    ' If its going to "print" the tabstrip shape on the client area, we
    '  need to paint the background colors first
    If wMsg = WM_PRINTCLIENT Then
        ' Retrieve the height of the tabs as stored when the tabstrip was
        '  first subclassed
        aTabHeight = GetProp(hwnd, "TabHeight")
        ' Get the dimensions for the tabstrip's area
        GetClientRect hwnd, aRect
        ' Create a brush with our "mainTabstrip" background color. this is the
        '  color that we're filling the main body of the tabstrip with
        abrush = CreateSolidBrush(getAppColor("mainTabstrip"))
        ' Adjust our fill area to down to the top of the tabs
        aRect.bottom = aRect.bottom - aTabHeight + 1
        ' Fill the main area of the tabstrip
        FillRect wParam, aRect, abrush
        ' clean up the brush object
        DeleteObject abrush
        ' Set the fill area to only the tab area. This doesn't really fill the
        '  tabs as much as it makes the area around the tabs the right color.
        '  that way we can match it to the backcolor of our form.
        aRect.bottom = aRect.bottom + aTabHeight
        aRect.top = aRect.bottom - aTabHeight + 1
        ' Create the brush the same color as the backcolor of our form
        abrush = CreateSolidBrush(getAppColor("formbackground"))
        ' Fill our selected area
        FillRect wParam, aRect, abrush
        ' clean up the brush object
        DeleteObject abrush
    End If
        
    ' Invoke whatever the default process for our tabstrip, including the
    '  WM_PRINTCLIENT message that will draw the tabstrip's border
    TabStripProc = CallWindowProc(oldWndProc, hwnd, wMsg, wParam, lParam)
End Function

Private Function TabStripOwnerProc(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
    
    Dim aform           As Form1    ' a dummy instance of Form1 for our slimy "safe" subclassing method
    Dim oldWndProc      As Long     ' original windows process for the form
    Dim lPtr            As Long     ' pointer to the instance of our Form1 object
    
    ' Get the original
    oldWndProc = GetProp(hwnd, "OrigWindowProc")
    
    If wMsg = WM_DRAWITEM Then
        ' Get our form's pointer address
        lPtr = GetProp(hwnd, "ODFormHwnd")
        ' check to make sure the pointer address is stored and valid
        If lPtr <> 0 Then
            ' splice in our address to the dummy instance
            CopyMemory aform, lPtr, 4
            ' Draw the tabstrip caption item
            aform.DrawTabItem hwnd, lParam
            ' erase the address from our dummy instance
            CopyMemory aform, 0&, 4
        End If
    Else
        ' Invoke the default process for the tabstrip's ownerform.
        TabStripOwnerProc = CallWindowProc(oldWndProc, hwnd, wMsg, wParam, lParam)
    End If

End Function

Open in new window

'Module1.bas
Attribute VB_Name = "Module1"
Option Explicit

Public Function getAppColor(aKey As String) As Long

    ' This is a dummy function until we release the code for our custom
    '  "theme resource" file, which stores colors and bitmaps

    Select Case LCase(aKey)
        Case "maintabstrip"
            getAppColor = RGB(58, 110, 165)
        Case "selected"
            getAppColor = RGB(186, 186, 204)
        Case "selectedtext"
            getAppColor = vbBlack
        Case "generaltext"
            getAppColor = vbBlack
        Case "bordercolor"
            getAppColor = RGB(85, 85, 118)
        Case "formbackground"
            getAppColor = RGB(223, 223, 223)
    End Select

End Function

Open in new window

Tweaking-the-Tabstrip---Part-1.pdf
0
 

Author Closing Comment

by:anesk
Comment Utility
Thank you very much, this is what I am looking for!
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now