Poné en un módulo
Type MYVERSION
lMajorVersion As Long
lMinorVersion As Long
lExtraInfo As Long
End Type
Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128 \' Maintenance string for PSS usage
End Type
Public Const VER_PLATFORM_WIN32s = 0
Public Const VER_PLATFORM_WIN32_WINDOWS = 1
Public Const VER_PLATFORM_WIN32_NT = 2
Declare Function GetVersionEx Lib \"kernel32\" Alias \"GetVersionExA\"
Function WindowsVersion() As MYVERSION
Dim myOS As OSVERSIONINFO, WinVer As MYVERSION
Dim lResult As Long
myOS.dwOSVersionInfoSize = Len(myOS) \'should be 148
lResult = GetVersionEx(myOS)
\'Fill user type with pertinent info
WinVer.lMajorVersion = myOS.dwMajorVersion
WinVer.lMinorVersion = myOS.dwMinorVersion
WinVer.lExtraInfo = myOS.dwPlatformId
WindowsVersion = WinVer
End Function
Espero te sirva
Ernesto
PD: Cualquier cosa mandame un mail a
[email protected]