-
Sigh.
You don't understand the code becuase its using Windows API calls.
http://msdn.microsoft.com/en-us/libr...ffice.10).aspx
http://visualbasic.about.com/od/usevb6/l/aa103002a.htm
To use this code:
1. Add a new code module to your project.
2. Paste in the above code.
You now have a public function "getVersion()" that returns a string telling you what the OS version is. Because the API constants have not updated, any OS after Server2003 will return "Failed".
[vba]If getVersion = "Failed" Then (its probably Vista)[/vba]
Then again, if you really have a hardon for the Excel .OperatingSystem property, you can still use it from Access...
You do know that you can use ANY other Office app from ANY Office VBA environment, right?
[vba]Function GetOSfromExcel() As String
Dim objXLApp As Object
Set objXLApp = CreateObject("Excel.Application")
GetOSfromExcel = objXLApp.OperatingSystem
objXLApp.Quit
Set objXLApp = Nothing
End Function[/vba]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules