So everything in this particular database was working for
a client of mine, until just last night I get notified that
he can’t open the database because of some error.
I was able to view his screen using T.V. and after clicking on
a command button, I would get the following error:
“Error 49 – Bad DLL Calling Convention”
Now, I have been working with Access for over 15 years, so I’m no novice, but I have
never seen this error before. Normally, when I see an error, I can tell myself, “Oh
I’ve seen that before, and last time I did this…”
This error is not a real common one for me. So I started hunting for a solution.
I noticed when I clicked “debug” that the code would break on my “IsLoaded” function.
So I “googled” for “Isloaded” and “Error 49” together.
…and I came across this link “http://w3facility.org/question/runtime-error-49-bad-dll-calling-convention/”
…which deals with Excel VBA.
“OK, maybe it will help”, I thought. “Makes sense”
So I added the following code above the code in the module where my “IsLoaded” function is located:
Private Something member = 1 End Enum
So altogether it was:
Private Something member = 1 End Enum Public Function IsLoaded(this_form) '...code for function End Function
…That’s all, AND IT WORKED!

Apparently it was some compilation error in the C libraries and this straightened
things out.
Maybe you have had a similar experience. If you have another solution, feel free to
share it.
How to Fix Run Time Error 1004 in Excel
If you work with Microsoft Excel frequently, chances ar ling for a solution. Fortunately, this error is well-documented, and there are several ways to resolve it. In this article, we’ll explore the causes of run time error 1004, practical steps to fix it, and preventive measures to reduce the chances of it happening again. What […]
How To Parse A Flat File In Excel VBA
In another post I demonstrated how to access a file on your computer using the MS Office Library. Here it is if you don’t know what I’m talking about. In this post, I am going to show you how to access the file and load it into your spreadsheet. I will do the same thing […]
How to pick a file to load In VBA
How to Pick a File in VBA: FileDialog & GetOpenFilename Explained When building Excel VBA applications, you’ll often need to let users pick a file to load in VBA. Instead of hard-coding file paths, you can use built-in dialogs that make file selection easy and user-friendly. VBA offers two main approaches: FileDialog object (flexible, customizable) […]
How can I interact with other Office applications (Excel) using VBA in Access?
Need to write your Access data or query to an Excel file? Here is the how to do it: Most people are familiar with Excel and know how to use it well (enough), and when you start talking about Access, they get scared off, and don’t know what to do anymore. Well, here you are […]
Support these sponsors: