Excel 2016 screenupdating false not working

Microsoft has provided an updated version of the Win32with all proper declarations available for download here: Office 2010 Help Files: Win32API_Ptr Safe with 64-bit Support When you run the installer after downloading the file form the link above, it does not tell you where it installed the information. I cant get these Api declarations to work with a 64bit office version. thanks in advance Tomas Option Explicit #If VBA7 Then Private Declare Ptr Safe Function Find Window Lib "user32" Alias "Find Window A" _ (By Val lp Class Name As String, By Val lp Window Name As String) As Long Ptr Private Declare Ptr Safe Function Find Window Ex Lib "user32" Alias "Find Window Ex A" _ (By Val h Wnd1 As Long Ptr, By Val h Wnd2 As Long Ptr, By Val lpsz1 As String, By Val lpsz2 As String) As Int Ptr Private Declare Ptr Safe Function Send Message Lib "user32" Alias "Send Message A" _ (By Val hwnd As Long Ptr, By Val w Msg As Long, By Val w Param As Long Ptr, By Val l Param As Any) As Long Ptr #Else Private Declare Function Find Window Lib "user32" Alias "Find Window A" _ (By Val lp Class Name As String, By Val lp Window Name As String) As Long Private Declare Function Find Window Ex Lib "user32" Alias "Find Window Ex A" _ (By Val h Wnd1 As Long, By Val h Wnd2 As Long, By Val lpsz1 As String, By Val lpsz2 As String) As Long Private Declare Function Send Message Lib "user32" Alias "Send Message A" _ (By Val hwnd As Long, By Val w Msg As Long, By Val w Param As Integer, By Val l Param As Any) As Long #End If Hi, Can you help me, to place Long Ptr insted of Long in delarations. Because here I can't post more then 2000 chars in one post Public Declare Ptr Safe Function WSAStartup Lib "wsock32.dll" (By Val w Version Required&, lp WSADATA As WSADATA) As Long Public Declare Ptr Safe Function WSACleanup Lib "wsock32.dll" () As Long Public Declare Ptr Safe Function gethostbyname Lib "wsock32.dll" (By Val host_name As String) As Long Public Declare Ptr Safe Function gethostname Lib "wsock32.dll" (By Val host_name As String, By Val namelen As Integer) As Integer Public Declare Ptr Safe Function setsockopt Lib "wsock32.dll" (By Val S As Long, By Val level As Long, By Val optname As Long, optval As Any, By Val optlen As Long) As Long Public Declare Ptr Safe Function w_socket Lib "wsock32.dll" Alias "socket" (By Val lng Af As Long, By Val lng Type As Long, By Val lng Protocol As Long) As Long Public Declare Ptr Safe Function w_closesocket Lib "wsock32.dll" Alias "closesocket" (By Val socket Handle As Long) As Long Public Declare Ptr Safe Function w_bind Lib "wsock32.dll" Alias "bind" (By Val SOCKET As Long, Name As SOCKADDR_IN, By Val namelen As Long) As Long Public Declare Ptr Safe Function w_connect Lib "wsock32.dll" Alias "connect" (By Val SOCKET As Long, Name As SOCKADDR_IN, By Val namelen As Long) As Long Public Declare Ptr Safe Function w_send Lib "wsock32.dll" Alias "send" (By Val SOCKET As Long, buf As Any, By Val length As Long, By Val Flags As Long) As Long Public Declare Ptr Safe Function w_send To Lib "wsock32.dll" Alias "sendto" (By Val SOCKET As Long, buf As Any, By Val length As Long, By Val Flags As Long, remote Addr As SOCKADDR_IN, By Val remote Addr Size As Long) As Long Public Declare Ptr Safe Function w_recv Lib "wsock32.dll" Alias "recv" (By Val SOCKET As Long, buf As Any, By Val length As Long, By Val Flags As Long) As Long Hi Satyendra, I'm sorry I can't help you with that on short notice, I'm way too busy to do this for you. I tried to find those functions in your given MSDN site. Can you help me sort this issue or suggest some good material where I can get all these function syntaxes. --------------------------------------------- #If VBA7 Then Private Type LASTINPUTINFO cb Size As Long Ptr dw Time As Long Ptr End Type Private Declare Ptr Safe Sub Get Last Input Info Lib "USER32" (By Ref plii As LASTINPUTINFO) #Else Private Type LASTINPUTINFO cb Size As Long dw Time As Long End Type 'Jan, The following references are checked: - Visual Basic For Applications - Microsoft Excel 14.0 Object Library - OLE Automation - Microsoft Office 14.0 Object Library I quickly scrolled through the entire reference list and did not see anything marked "Missing".Look in this -new- folder on your C drive: C:\Office 2010 Developer Resources\Documents\Office2010Win32API_Ptr Safe You can find a list of the old Win32 API declarations here: Visual Basic Win32 API Declarations Microsoft also published a tool to check your code for 64 bit related problems, called the Microsoft Office Code Compatibility inspector addin. Protect ("BCG") Beep End Sub ---------------- Thanks I tried what you said but the result was very little faster. I suggest you to find the information on each of the functions you mention on the Microsoft MSDN site: I mentioned above: Anything called a handle, pointer, brush or any other object type will require a Long Ptr in 64-bit. Satyendra Hi, I modified all the declarations, except the select statement. Public Declare Ptr Safe Function w_select Lib "wsock32.dll" Alias "select" (By Val nfds As Long, read Fds As fd_set, write Fds As fd_set, except Fds As fd_set, timeout As timeval) As Long Satyendra Hello. Hi Maria, Thanks for letting me know, great you could solve your problem.Many of the declarations were figured out by Charles Williams of he created the 64 bit version of our Name Manager. There is an introductory article on Microsoft MSDN: Compatibility Between the 32-bit and 64-bit Versions of Office 2010 That article describes the how-to's to properly write the declarations.

Office64 #Else Detect Office Platform Version = Office Platform Version. The last DLL error is 87 It It consistantlly works on XP Access 2007 but not on Windows 7 Access 2010. Im having problem with the following line: Declare Function implied BS Lib "c:\dll\option.dll" (By Val flag As Double, By Val prazo As Double, By Val spot As Double, By Val strike As Double, By Val taxa As Double, By Val mercado As Double, By Val dividend As Double) As double i tried to add the ptrsafe, like this: Declare Ptr Safe Function implied BS Lib "c:\dll\option.dll" (By Val flag As Double, By Val prazo As Double, By Val spot As Double, By Val strike As Double, By Val taxa As Double, By Val mercado As Double, By Val dividend As Double) As Long but the function is still not working, im wondering why..idea?

Office32 #End If End Function Thanks for the code example above. tks HI BERNARDO, I'm sorry, but I don't appear to have that dll, so it is not possible for me to answer your question! here a sample already modified for 64 bit but crash al line: Cust Colors = Str Conv(a Custom Colors, vb Unicode) (Version 32 bit works properly) *** ERROR: Runtime 13 Conversion type error #If VBA7 Then Dim l Return As Long Long Dim a Custom Colors(0 To 16 * 4 - 1) As Long Dim i As Integer Dim lp CC As Long Ptr For i = LBound(a Custom Colors) To UBound(a Custom Colors) a Custom Colors(i) = 0 Next i lp CC = Str Conv(a Custom Colors, vb Unicode) Dim CC As CHOOSECOLOR CC.l Struct Size = CLng(Len(CC)) CC.h Wnd Owner = CC.h Instance = CLng(0) Cust Colors = Str Conv(a Custom Colors, vb Unicode) CC.flags = CLng(0) l Return = Choose Color(CC) If l Return 0 Then Me.

The Send Message API is a good example because it uses both types: 32-bit: The first argument -h Wnd- is a window handle, which is an address in memory. NB: what isn't mentioned is that the executable unzips the information to this folder on your hard drive: C:\Office 2010 Developer Resources\Documents\Office2010Win32API_Ptr Safe I disagree with WPARAM (such as in Send Message) as it is defined as a UINT_PTR which is defined as 64 bit pointer on 64 bit platforms and a 32 bit pointer on 32 bit platforms per MSDN and windef.h: typedef UINT_PTR WPARAM; #if defined(_WIN64) typedef unsigned __int64 UINT_PTR; #else typedef unsigned int UINT_PTR; #endif Hi, I've got MS Excel 2003 file with VBA macros, but I already have MS 2010 with 64bit rate.

The return value is a pointer to a function, which is also an address in memory. So, I cannot run macros and get the VBA respond "Compile error: Can't find object or library".

Both of these must be declared Long Ptr in 64-bit VBA. Then I Reset VBA macro and went to References-VBAProjects via Tools.

The arguments w Msg and w Param are used to pass data, so they can be Long in both 32-bit and 64-bit. I found there MISSING: Microsoft Office Web Components 11.0. Add(Name:="Test_Check_Toolbar", Position:=mso Bar Bottom, Temporary:=True) 2. Function APR_calc(RIV As Double, Payment_Frequency As Integer, term As Integer, grace_period As Integer, first_pmt As Double, weekly_pmt As Double, final_pmt As Double) May you please help somehow?

Specially one macro, with two nested loops, that could generate a report in 15 seconds and now takes an hour. The files I tried work on any Office version since Office 97 up to and including 2010. I'm just starting down this road and I believe you need to talk more about the need to use the Win64 constant.

My own scenario is: Office 2007 (32 bit), Office 2010 (32 bit) and Office 2010 (64 bit). I cant just use #if VBA7 then use Long Long and Lng Ptr declarations, because if I do this it will fail to compile on Office 2010 32 bit with a "User Defined Type Not defined" and highlighting the line that contains Long Long Granted, the compiler statement works fine on Office 2010 64 bit.

I am using Harbour Minigui and getting an error when writing data to Excel 2007. Is the Prt Safe required for this or could there be other factors?

The error is DISP_E_BADPARAMCOUNT: ADD The routine works on my laptop but not at the office PC using Vista and Office 2007. Moving a working application over to the new server this week, the API functions fail.

With the introduction of Windows 7 and Office 2010 VBA developers face a new challenge: ensuring their applications work on both 32 bit and 64 bit platforms.

Tags: , ,