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");
- Object vbaResult = null;
- // A VBA Module in the opened database contains:
- //
- // Public Sub AddTen(ByVal in_value As Long, ByRef out_value As Long)
- // out_value = in_value + 10
- // End Sub
- //
- app.Run("AddTen", 4, ref vbaResult);
- app.Quit();
- Console.WriteLine(vbaResult.ToString()); // 14
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement