Skip to main content

Posts

Showing posts with the label GetVersionEx VBA

How to get OS Version using VBA

How to retrieve Operating System Information using Excel/Word VBA The version information of OS can be retrieved using the WIN API functions given below Private Type OSVERSIONINFO dwOSVersionInfoSize As Long dwMajorVersion As Long dwMinorVersion As Long dwBuildNumber As Long dwPlatformId As Long szCSDVersion As String * 128 End Type Private Declare Function GetVersionEx Lib "kernel32" _ Alias "GetVersionExA" (lpVersionInformation As _ OSVERSIONINFO) As Long The following sub uses GetVersionEx function to get the Major and Minor version of OS Sub Get_OS_Version_VBA() ' ------------------------------------------------------------- ' Code to Get Version of Operating System through VBA ' ------------------------------------------------------------- Dim oOSInfo As OSVERSIONINFO oOSInfo.dwOSVersionInfoSize = Len(oOSInfo) GetVersionEx oOSInfo ' ------------------------------------------------------------- ' Coded for ...

Facebook

Facebook Recommendations

Followers


Web Designing In Karachi



Haroof.com


Politics blogs

My Zimbio

Email Subscribe

Enter your email address:

Watch online Live TV

Labels

Show more