ReusingC#ViaCOM

A C# project that can be used to expose methods to VBA via COM automation:

The project includes multiple methods:

C-Sharp form, printing and formatting options

  • void PrintFormat();
  • void PreviewThis();
  • string SelectFolder(string defaultPath);

C-Sharp OLAP connection-related methods

  • string GetDbsToString(string server);
  • bool VerifyConnection(string server, string db, string cube);
  • bool ModifyConnections(string server, string db, string cube);

C-Sharp refresh pivot methods

  • void RefreshWorkbookPivots(_Workbook workbook);
  • void RefreshThisPivot(PivotTable table);
  • void RefreshSheetPivots(_Worksheet worksheet);

The project implements one form for printing, but otherwise has no UI. Included is a text file showing how to access and execute the methods via VBA.

Right-click to Save Target As: COMReusable.zip

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License