Results 1 to 11 of 11

Thread: Find out if it is win32 or win64 by vba code

Hybrid View

  1. #1
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    Re: Find out if it is win32 or win64 by vba code

    Finally, as none of us seemed to spot this was your 1st post here, from all of us - welcome to the forums!

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  2. #2

    Thread Starter
    New Member
    Join Date
    Jul 2008
    Posts
    2

    Re: Find out if it is win32 or win64 by vba code

    Thanks for spotting my first post.

    First of all lemme thank you all. You are awesome. Awesome ! Awesome !!!
    This is the best forum I have ever visited (between all different kindda forums ). Such amazing replies !! I simply can't believe it.

    I have been busy today. but I am going to try these out, and give u some results. However, I have found this too (not sure if it's gonna work).

    Application.OperatingSystem

    which gives out "windows (32-bit) NT 5.01"
    so by searching this string, one can decide between 32 or 64-bit versions. But I am not sure how will this work on a 64-bit machine ?

    Cheers

  3. #3
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    Re: Find out if it is win32 or win64 by vba code

    Technically, you should be able to use something similar to this code, and you could replace that with string with "16", "64" or even "Mac", etc.
    Code:
    If Not Application.OperatingSystem Like "*32*" Then
    However, according the the DeveloperDex forums, when the VBA "Application.OperatingSystem" runs on a 64-bit platform, it reports a 32-bit operating system (that was a little shortsighted of them, bad programming)! The guy mentioned he's reported this to MS, but it looks like you won't be able to use that call successfully unforunately.

    That's the 3rd one in just this simgle thread now - SetEnvironmentVariable, GetEnvironmentVariable and Application.OperatingSystem which we've had to code around (successfully, might I add) due to the restrictions or bugs of these calls - maybe we should be applying to work on the Office or Windows API teams at Microsoft soon!!!

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width