Report Functions - Core and Example Modules


The TAS generated Excel reports include functions that assist with report analysis and setting up customized reports. These features were developed with Microsoft Excel 2003, Visual Basic 6.5.

The modules/functions developed using the Visual Basic are available for you to be used in your custom functions.  The TAS generated Microsoft Excel report provides many core functions and procedures to assist you in creating custom reports. The Excel report includes two main VB modules, core and example.

Core Module

The core module contains several utility functions and procedures associated with the report tool bar buttons:

Function

What it does...

CreateLandslideTable Creates a new worksheet including any combination of Interval, Iteration, and Elapsed Time columns
AddColumnsToSheet Adds a set of columns to an existing worksheet.
FindAndSelectColumnNamed Finds and selects a column of measurements based on worksheet/tab name and column (i.e., Measurement) name.
GetSelectedColumnsAsRange Gets the selected columns as a Visual Basic Range object.
AddChartSheetNames Adds current selected columns to a new chart worksheet
AddChartToSheetNamed Adds current selected columns to a new chart embedded in a worksheet.
AddToChartNamed Adds current selected columns to an existing worksheet chart.
AddToEmbeddedChartNamed Adds current selected columns to an existing chart embedded in a worksheet.

 


Example Module

The example module contains the ExampleTemplate1 procedure.  This procedure demonstrates using the core module to create a custom report layout. When developing your own custom report macros, functions, and procedures, you can use this ExampleTemplate1 procedure as a baseline.

Your custom report macros, functions and procedures must exist in a global workbook that runs all the time (that is, whenever you open Excel these example modules must be loaded automatically). An example Excel workbook named LandslideGlobal.xls has been provides for your ease of reference. This example file contains the Visual Basic modules and forms that can be modified.

To create custom macros:

  1. Install a global workbook that will open by default when you start Excel.
  1. Download the LandlsideGlobal.xls from the Landslide Home Page (link provided under the Tools section).

  2. Copy it into the XLSTART directory (e.g., C:\Program Files\Microsoft Office\OFFICE11\XLSTART).  See http://support.microsoft.com/kb/822107 for more information about the XLSTART directory.   

  1. Create/customize toolbars and assign macros.
  1. Start MS Excel and the LandslideGlobal.xls opens by default.  

  2. Click View >Toolbars > Customize... and the Customize window opens.

  3. Click the Toolbars tab, click the New… button to create a new toolbar. Enter an appropriate/required name for the toolbar and click OK.

  4. Click the Commands tab, from the list under the categories, select Macros and then drag and drop the Custom Button to the new toolbar.

  5. Right-click on the new button and choose Assign Macro….

  6. Select the ExampleTemplate1 macro from the LandslideGlobal.xls and click OK.   Once you create your own macros and procedures you can select them here.

  7. Right-click on the button, select the desired Image and Text, and then change the name as Custom Report.

  8. Drag the new Toolbar to the Toolbar area at the top so that it becomes embedded.

  1. Hide the LandslideGlobal.xls by selecting Window > Hide menu.   
  2. The next time you open a Landslide report, your new toolbar will be available.    When you want to create your own custom reporting macros, use the LandslideGlobal.xls and your new toolbar.
NOTES:
  • When the file LandslideGlobal.xls hidden, you will not see the unused blank worksheet, but your new toolbar will remain and the button(s) has access to the Visual Basic modules and macros.
  • To add more buttons and link macros and functions in LandslideGlobal.xls, unhide it first (Window > Unhide).  
  • The Assign Macro dialog will not show the hidden workbooks.  However, you can see the hidden workbook in the Visual Basic Editor.
  • If you need any further assistance contact Technical Support.