Results 1 to 26 of 26

Thread: [RESOLVED] Run-time error '6': Overflow

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2005
    Posts
    294

    [RESOLVED] Run-time error '6': Overflow

    I colored the line that errors in red. I have NO idea what the hell is wrong. :'(
    VB Code:
    1. Option Explicit
    2. Type TypeDiskDrive
    3.     InterfaceType As String
    4.     Partitions As Long
    5.     Size As Long
    6.     Status As String
    7. End Type
    8. Public DiskDrives As TypeDiskDrive
    9. Sub Main()
    10.    Debug.Print "MDiskDrives->Main();"
    11. End Sub
    12. Public Sub Win32_DiskDrive()
    13.     Debug.Print "MDiskDrives->Win32_DiskDrive();"
    14.     Dim CIMV2 As Object
    15.     Dim Result As Object
    16.     Dim Row As Object
    17.     Set CIMV2 = GetObject("winmgmts:\\127.0.0.1\root\CIMV2")
    18.     Set Result = CIMV2.ExecQuery("SELECT InterfaceType, Partitions, Size, Status FROM Win32_DiskDrive", "WQL", &H10 + &H20)
    19.     For Each Row In Result
    20.         MsgBox Row.Size
    21.         DiskDrives.InterfaceType = Row.InterfaceType
    22.         DiskDrives.Partitions = Row.Partitions
    23.         [COLOR=Red]DiskDrives.Size = Row.Size[/COLOR]
    24.         DiskDrives.Status = Row.Status
    25.     Next
    26. End Sub
    Last edited by frozen; Nov 5th, 2005 at 03:24 AM. Reason: :D

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width