Update: A "nicer" version might look like that Option Explicit Work around is Wow64DisableWow64FsRedirection.
I am developing software that uses the on-screen keyboard, the only The comments appear to miss your point here, anyoneĬan start osk.exe from Run, but call it from within a 32-bitĪpplication won't work in 64-bit Windows. Windows won't allow you to call a 64-bit OSK.exeįrom your program. This is an issue with 64-bit OS, it affects any 64-bit version of Windows.īasically you are calling osk.exe, but your program you are calling itįrom is a 32-bit app. ShellExecute 0, "open", "osk.exe", "", "C:\windows\system32\osk.exe", SW_SHOWNORMALįound here, this might the explanation, quote from the link Private Declare Function Wow64EnableWow64FsRedirection Lib "kernel32.dll" (ByVal Enable As Boolean) As Boolean Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Is that what's causing the issue or possibly it's a Windows 10 thing? I have a Surface laptop/tablet, so it has a touch screen and a "touch" keyboard (different from the osk). I checked the path to osk.exe is correct. ShellExecute 0, vbNullString, "osk.exe", vbNullString, "C:\", 1 ' File name or class name not found during Automation operationĪctiveWorkbook.FollowHyperlink Address:="C:\Windows\System32\osk.exe" RetVal = Shell("C:\WINDOWS\system32\osk.exe", 1) Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _īyVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _īyVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Here are my attempts so far: ' Only needed for Test3
I'm trying to pull up the on-screen keyboard.