![]() InputBoxDK = InputBox(Prompt, Title, Default,, , Helpfile, Context) InputBoxDK = InputBox(Prompt, Title, Default, Xpos, Ypos, Helpfile, Context) HHook = SetWindowsHookEx(WH_CBT, AddrOf("NewProc"), lngModHwnd, lngThreadID) LngModHwnd = GetModuleHandle(vbNullStri ng) Public Function NewProc(ByVal lngCode As Long, _ĭim strClassName As String, lngBuffer As Long 'Constants to be used in our API functions Private Declare Function GetCurrentThreadId _ Lib "user32" Alias "SendDlgItemMessageA" ( _ Private Declare Function SendDlgItemMessage _ Private Declare Function UnhookWindowsHookEx _ Private Declare Function SetWindowsHookEx _ Private Declare Function GetModuleHandle _ Private Declare Function CallNextHookEx _ 'Allows you to hide characters entered in a VBA Inputbox. LngResult = GetAddr(hProject, strID, lpfn) ' We have to check this because we GPF if we try to get a function pointer ' Get the VBA function ID (whatever that is!) ' so now we just check the project handle when the function returns. ' The results of GetCurrentVBAProject seemed inconsistent, in our tests, ![]() StrFuncNameUnicode = StrConv(strFuncName, vbUnicode) ' The function name must be in Unicode, so convert it. Public Function AddrOf(strFuncName As String) As Long This makes sense, since we are using a function ' NOTE: This function only seems to work if the proc you are trying to get a pointer ' gives similar functionality to VBA as VB5 has with the AddressOf param type. ' Returns a function pointer of a VBA public function given its name. Private Declare Function GetCurrentVbaProject _ ' TipGetLpfnOfFunctionId: Gives you a pointer a function given its function ID ' TipGetFunctionId: Gives you a function ID given a function name ' EbGetExecutingProj: Gives you a handle to the current VBA project ' light of the function names and what each parameter does. ' These parameters may not be named properly but seem to be correct in ' through a lot of trial and error and over 100 IPFs in MSACCESS.EXE ' with VBA332.DLL and then puzzling out parameter names and types ' These function names were puzzled out by using DUMPBIN /exports I know this is possible in MS Excel by creating a customer Inputbox in module code, however the Excel code does not work in MS Access. I know that this has been asked before but I want some code to create an inputbox in MS Access that has a password character * in it rather than displaying the text.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |