![]() ![]() Activation disk with a serial number that matches the RSView32 software. Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback. ActiveX, Microsoft, Visual Basic, Visual FoxPro, Windows, and Windows NT are. Objects (Visual Basic for Applications).I tried running the macro in the SerialNumber Property example in VB Help. S = "Drive " & d.DriveLetter & ": - " & t I want to write a macro that will retrieve the users hard drive serial number. Set d = fs.GetDrive(fs.GetDriveName(fs.GetAbsolutePathName(drvpath))) Set fs = CreateObject("Scripting.FileSystemObject") Sub ShowDriveInfo (drvpath) Dim fs, d, s, t Set fs CreateObject ('Scripting.FileSystemObject') Set d fs.GetDrive (fs.GetDriveName (fs.GetAbsolutePathName (drvpath))) Select Case d.DriveType Case 0: t 'Unknown' Case 1: t 'Removable' Case 2: t 'Fixed' Case 3: t 'Network' Case 4: t 'CD-ROM' Case 5: t 'RAM Disk' End Select s 'Drive ' & d.DriveLetter & ': - ' & t s s & vbCrLf & 'SN: ' & d.SerialNumber. The following code illustrates the use of the SerialNumber property. The following code illustrates the use of the SerialNumber property. Use the SerialNumber property to ensure that the correct disk is inserted in a drive with removable media. Returns the decimal serial number used to uniquely identify a disk volume. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |