troubleshooting Question

Error 453, Can't find DLL entry point Sleep in kernel32 with VBA call in Office add-in

Avatar of Jamie Garroch (MVP)
Jamie Garroch (MVP)Flag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft OfficeMicrosoft ExcelMicrosoft PowerPointWindows OSVBA
3 Comments1 Solution427 ViewsLast Modified:
I have an Office VBA add-in that's causing a problem with one issolated user amongst many others that are not experiencing the the same issue. I've issolated it to the Windows API Sleep function.

This is the declaration I'm using, the 64 bit version coming from official Microsoft documentation (I also tried LongLong instead of Long):

#If VBA6 Then
  ' from Microsoft's Win32API_PtrSage.txt
  Private Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
#Else
  Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
#End If

When trying to call this with this example in the same module:

Public Sub TestSleep()
    Sleep 1000
End Sub

This particular user sees this error message:

"453 Can't find DLL entry point Sleep in kernel32"

They are using Office 2016, 32 bit (build 10730) on Windows 10, 64 bit and I have had them check the version of the kernel32.dll which is 10.0.16299.1029, 3/6/2019 (my PC has 10.0.1734.648, 06/03/2019)

What can I do now to establish the cause of the issue and fix it?
ASKER CERTIFIED SOLUTION
ste5an
Senior Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros