Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var app = new Microsoft.Office.Interop.Access.Application();
- app.OpenCurrentDatabase(@"C:\Users\Public\Database1.accdb");
- // A VBA Module in the opened database contains:
- //
- // Public Function AddTenFunction(in_value As Long) As Long
- // AddTenFunction = in_value + 10
- // End Function
- //
- int fnResult = app.Run("AddTenFunction", 4);
- app.Quit();
- Console.WriteLine(fnResult);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement