![api vba showwindow api vba showwindow](https://docplayer.org/docs-images/44/4557444/images/page_11.jpg)
The value that you pass in the nIndex argument tells the function which metric you want to be given, and must be one of a specific set of constants that the function knows about. For example, to get information about the operating system's capabilities, you can use the GetSystemMetrics function:ĭeclare Function GetSystemMetrics Lib "user32" ( _ ByVal nIndex As Long) As Long
![api vba showwindow api vba showwindow](https://i.stack.imgur.com/57MSg.jpg)
#End IfIf all your users are running Access 2010 or later (VBA7), the first section will normally run whether it is 32-bit or 64-bit.Most of the API functions include arguments that accept a limited set of predefined constants. Private Declare Function apiShowWindow Lib "user32" Alias "ShowWindow" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long Private Declare Function apiSetWindowPos Lib "user32" Alias "SetWindowPos" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, _ Private Declare Function apiGetWindowRect Lib "user32" Alias "GetWindowRect" (ByVal hWnd As Long, lpRect As typRect) As Long Private Declare Function apiGetClientRect Lib "user32" Alias "GetClientRect" (ByVal hWnd As Long, lpRect As typRect) As Long Private Declare PtrSafe Function apiShowWindow Lib "user32" Alias "ShowWindow" (ByVal hWnd As LongPtr, ByVal nCmdShow As Long) As Long Private Declare PtrSafe Function apiSetWindowPos Lib "user32" Alias "SetWindowPos" (ByVal hWnd As LongPtr, ByVal hWndInsertAfter As LongPtr, _īyVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long Private Declare PtrSafe Function apiGetWindowRect Lib "user32" Alias "GetWindowRect" (ByVal hWnd As LongPtr, lpRect As typRect) As Long Private Declare PtrSafe Function apiGetClientRect Lib "user32" Alias "GetClientRect" (ByVal hWnd As LongPtr, lpRect As typRect) As Long It won't affect 32bit, but it will affect 64bit.Ĭode: #If VBA7 Then 'need datatype LongPtr Do not do a blanket change of all longs to longptr. Typically used in API calls but you might also be using them in your general code. hwnd) (which are longs in 32bit and longlongs in 64bit) that need to be handled.
#Api vba showwindow 64 Bit
Slight alternative is to use LongPtr which will be interpreted correcting in 32b or 64 bit i.e.ĭeclare PtrSafe Function MyMathFunc Lib "User32" (ByVal N As LongPtr) As Long Typically used in API calls (where you must also use PtrSafe) but you might also be using them in your general code. accdb's then subject to making these changes it should run in either environment. You cannot run 64bit and 32bit side by side on the same machine.
#Api vba showwindow code
accde then you will need two versions - one for each bit - so modifying code such as Ranman suggests means you need two machines to create the.
#Api vba showwindow 32 bit
Several of these tools are mission critical so I will have to make the changes ASAP but I want to manage expectations going in to the change.Īlso, can I run both the 64 and 32 bit versions of Office (at least Access and Excel) on the same machine? the part that I KNOW is going to be a pain is the maintaining of 2 versions of each application until everyone is on the new version. I am just looking for thoughts on how big a project I have in front of me. I dont currently have the 64bit version so i cant start looking into what is going to be required. Several of them export to Excel and format/process the output using calls to Excel VBA. ) and connect to Access backends via linked tables.
![api vba showwindow api vba showwindow](https://www.excelcampus.com/wp-content/uploads/2015/01/Docking-the-VBA-Immediate-Window.gif)
They all just use the standard Access form objects (comboboxes, listboxs, tabstrip. I have about 15 multi user Access applications that i have developed over the past 10 years that were all developed in the 32 bit enviroment. I have NO input or pull to change the decision so i have to live with it. It appears that the company i work for has decided that all future Office upgrades and and new computers are going to have the 64 bit version of Office 2016.