Run 32 bit office on 64 bit windows 7
Subscribe in a reader. Many of the declarations were figured out by Charles Williams of www. Of course Microsoft documents how to do this. Compatibility Between the bit and bit Versions of Office That article describes the how-to's to properly write the declarations. What is missing is which type declarations go with which API function or sub. Microsoft has provided an updated version of the Win32API.
Office Help Files: When you run the installer after downloading the file form the link above, it does not tell you where it installed the information. Look in this -new- folder on your C drive: Microsoft also published a tool to check your code for 64 bit related problems, called the Microsoft Office Code Compatibility inspector addin.
Utter Access API declarations a comprehensive list of many declarations. Last, but certainly not least: Dennis Walentin has built an API viewer that is really helpful. You can find the API viewer here. It's actually pretty easy to determine what requires LongPtr and what can stay as Long.
The only things that require LongPtr are function arguments or return values that represent addresses in memory. This is because a bit OS has a memory space that is too large to hold in a Long data type variable. Arguments run 32 bit office on 64 bit windows 7 return values that represent data will still be declared Long even in bit.
The run 32 bit office on 64 bit windows 7 argument -hWnd- is a window handle, which is an address in memory. The return value is a pointer to a function, which is also an address in memory. The arguments wMsg and wParam are used to pass data, so they can be Long in both bit and bit. How to determine what is a memory address and what is data?
Anything called a handle, pointer, brush or any other object type will require a LongPtr in bit. Anything that is strictly data can stay as Long.
If your code needs to run on both 32 bit and run 32 bit office on 64 bit windows 7 bit Excel, then another thing to do is add conditional compilation to your VBA. Since the 64 bit declarations also work on 32 bit Officeall you have to test for is VBA Have a function declaration which is not on this list? I invite you to send me your working and tested!!!
If your question is not directly related to this web page, but rather a more general "How do I do this" Excel question, then I advise you to ask your question here: Please enter your name required: Your e-mail address optional, will only be used once to inform you when your comment is published or to respond to your question directly: Your request or comment: Links Of course Microsoft documents how to do this.
Compatibility Between the bit and bit Versions of Office That article describes the how-to's to properly write the declarations. Declarations by API function Function name Declarations 32 bit followed by 64 bit CreateProcess We start off with a complicated one because it has a lot of arguments. A fully functional example is included below the example declaration lines.
Comments Showing last 8 comments of in total Show All Comments: Jan Karel Pieterse info jkp-ads. We start off with a complicated one because it has a lot of arguments. This is one of the few API functions that requires the Win64 compile constant: