DougM
DougM

Reputation: 129

vba compile error function or interface marked as restricted VBA Error when interfacing from Access to .NET com dll

I have a com dll created in VB.NET that has been working for a number of years. The dll takes information from MS Access and creates orders on eBay using their Soap api. All of a sudden I started getting the error message "vba compile error function or interface marked as restricted, or the function uses an automation type not supported in Visual Basic" when I compile the Access application. The error is on a line where a property of type decimal in the dll is updated with data of type decimal from an DAO recordset. This part of the code has been stable for quite a while so I am at a loss as to why all of a sudden this error starts. Any suggestions would be appreciated.

Upvotes: 0

Views: 531

Answers (1)

DougM
DougM

Reputation: 129

For future reference. It appears that MS Access type decimal is not equivalent to VB.NET type decimal. MS Access sees VB.NET double as equivalent to its type decimal. Once I converted my property to a double data type the compile error went away.

Upvotes: 1

Related Questions