LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Error running GetVersionExA

I have a VBA program which uses the WIN32API GetVersionExA:

Private Declare Function GetVersionEx Lib "kernel32" _
Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As
Boolean

....

Dim theOsVersionInfo As OSVERSIONINFO
theOsVersionInfo.dwOSVersionInfoSize = 148

If GetVersionEx(theOsVersionInfo) Then
...
else
...
end if


When windows is started in Normal mode, the If statement flows into
the else block. And all the fields in theOsVersionInfo have initial
values.

It works when windows is started in Safe mode.

Windows Version: XP SP2, with most hotfix applied
Excel version: 2003 SP2

Any suggestion? Thanks

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error 400 when running Macro Jim@Tech Excel Discussion (Misc queries) 3 October 20th 08 05:35 PM
Div/0 error on running mean % ferde Excel Discussion (Misc queries) 2 October 4th 08 02:40 AM
Run-time error 9 when running add-in RobH Excel Programming 4 May 9th 07 12:39 PM
Error when running macro Rob Excel Programming 2 December 9th 04 07:20 AM
Running from web error Ken[_14_] Excel Programming 0 September 11th 03 06:47 PM


All times are GMT +1. The time now is 06:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"