Thanks Memnoch that was helpful. Here is an example of some vb6.0 code i don't completely understand to help you see my problem.
VB Code:
'Declarations Section Dim CDPath As String Dim FSO As New Scripting.FileSystemObject Dim DRV As Drive 'A generic drive type Dim X As Integer X = 0 'initiate x 'checks the Drives for CD-ROMs For Each DRV In FSO.Drives If DRV.DriveType = CDRom Then CDPath = DRV.Path 'gets the drive letter 'Debug.Print CDPath X = X + 1 ReDim Preserve gsCDdrive(X) gsCDdrive(X) = CDPath 'stores letter and number of drives 'Debug.Print gsCDdrive(x) End If Next DRV 'This generic drive becomes nothing after going through all the drives
How is DRV being used? All the comments are mine. I would say that the DRV is empty but evidently it is something. i just don't understand WHY this works. A datatype by itself does nothing. What is the difference between DRV=Nothing and DRV = some type of drive. Evidently it reads it in the above code as some type of drive, but it equals nothing. is For each drv in FSO.drive a type of assignment? I only know of one type of assignment operator.




Reply With Quote