Specify an External Data Table File for a Test
Source code
'************************************************************************************************************************
'Description:
'
'This example opens a new test and configures the resources for the test.
'
'Assumptions:
'There is no unsaved test currently open in UFT.
'For more information, see the example for the Test.SaveAs method.
'************************************************************************************************************************

Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Dim qtTestResources 'As QuickTest.Resources ' Declare a Resources object variable

Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.Launch ' Start UFT
qtApp.Visible = True ' Make the UFT application visible
qtApp.New ' Open a new test

' Return the Resources object
Set qtTestResources = qtApp.Test.Settings.Resources

' Specify an external Data Table file
qtTestResources.DataTablePath = "C:\Resources\Default.xls"

Set qtTestResources = Nothing ' Release the Resources object
Set qtApp = Nothing ' Release the Application object