Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to set relative path for excel
#1
Solved: 10 Years, 9 Months, 3 Weeks ago
Hi,

Below is my code:

Step 1:
Code:
Set objExcel = CreateObject("Excel.Application")
Step 2:
Code:
Set objWorkbook = objExcel.WorkBooks.Open("D:\Partner Security Program\Test_Data\InspectCustomer.xls")

Step 3:
Code:
Set objDriverSheet = objWorkbook.Worksheets("Inspect Customer")

In Step 2, I want to set the relative path like
Code:
Set objWorkbook = objExcel.WorkBooks.Open("..\ ..\Test_Data\InspectCustomer.xls")

It is prompting error saying it could not locate the file ... please let me know the exact syntax
Reply


Messages In This Thread
how to set relative path for excel - by kamalteja - 03-27-2008, 12:24 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to get relative path by using testdir environment variable Sathyaprasad 1 1,795 11-30-2017, 02:21 AM
Last Post: supputuri
  Want to read the data from excel and set read value in the JavaTable rajeevk7 0 2,174 07-10-2017, 04:20 PM
Last Post: rajeevk7
  Path of Flight reservation Window is not recorded in HP UFT 12.52 version mailtokopalverma@gmail.com 1 2,414 04-01-2016, 05:34 PM
Last Post: vinod123
  X path Identification vasavi.vasavi 1 2,710 07-29-2015, 10:44 AM
Last Post: kbhargava505
  environment variable path for qc automation2012 0 2,641 01-18-2015, 08:18 AM
Last Post: automation2012

Forum Jump:


Users browsing this thread: 1 Guest(s)