Office Connector Web HelpOnline Help

OCSetConnection Macro

Contents Index


 Application.Run("OCSetConnection", DataFolderPath, OperatorID, Password, AutoRefresh)
ArgumentDescription
DataFolderPathOptional.  The full path to the data folder.  You will be prompted to select a data folder prior to refreshing if this argument is left blank or is invalid.
OperatorIDOptional.  A valid Timberline operator ID.  You will be prompted for login credentials if this value is blank or invalid.
PasswordOptional.  The password associated with the Timberline operator ID.  You will be prompted for login credentials if this value is blank or invalid.
AutoRefreshOptional.  Pass True to force the workbook to refresh when you call this macro.  The default is False.

Remarks

The OCSetConnection macro can be used to
  • Automatically refresh your workbook when it is opened.
  • Support a manual refresh, but without the need to select the data folder or supply your operator ID and password.
  • Automatically refresh your workbook as part of an unattended, scheduled refresh in conjunction with Windows Task Scheduler.
The typical scenario involves calling this macro in the Workbook_Open event under the ThisWorkbook object.

Example

Sub Workbook_Open()

Call Application.Run("OCSetConnection", "D:\TSDATA\MyFolder", "pat", "password", True)

End Sub


Note -Protect the VBA project with a password to prevent others from discovering your Timberline Operator ID and password.

See Also



Content updated 12/4/2012

Copyright 2012 Event 1 Software, Inc.  This documentation may not be copied in full or in part without written permission from Event 1 Software, Inc.