Creating an Enum : Enum « Data Type « VBA / Excel / Access / Word

Home
VBA / Excel / Access / Word
1.Access
2.Application
3.Data Type
4.Data Type Functions
5.Date Functions
6.Excel
7.File Path
8.Forms
9.Language Basics
10.Math Functions
11.Outlook
12.PowerPoint
13.String Functions
14.Windows API
15.Word
16.XML
VBA / Excel / Access / Word » Data Type » Enum 
Creating an Enum
 

    
    Public Enum SystemMetrics
       SM_MOUSEPRESENT = 19
       SM_SWAPBUTTON = 23
       SM_MOUSEWHEELPRESENT = 75
    End Enum
    
    Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As SystemMetricsAs Long

Type RECT
   Left As Long
   Top As Long
   Right As Long
   Bottom As Long
End Type

Declare Function ClipCursor Lib "user32" (lpRect As RECTAs Long

Sub Foo()
   Dim rectClipArea As RECT
   Dim lngRetVal As Long

   With rectClipArea
      .Top = 200
      .Left = 100
      .Bottom = 420
      .Right = 280
   End With

   lngRetVal = ClipCursor(rectClipArea)

End Sub

 
Related examples in the same category
1.Working with Enumerated Types
2.Control the long integer value assigned to each item in the list, simply set the constant equal to a value
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.