Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
General run error
#1
Not Solved
hi,
I am using the below code
Code:
Set oShell = CreateObject("WScript.Shell")
       sCurrDir=oShell.CurrentDirectory
    pCurrpath=Split(sCurrDir,"\")
     For i=0 to ubound(pCurrpath)-2
    sCurrentPath=sCurrentPath & pCurrpath(i) &"\"
      Next
       InputXls=sCurrentPath &"\Data\ICentral.xls"
         Datatable.AddSheet("ICentral")
    Datatable.ImportSheet ""&InputXls&"","ICentral","ICentral"

I am getting general run error at

Code:
InputXls=sCurrentPath &"\Data\ICentral.xls"
Any help will be really appreciated.
Regards;
Vijay
Reply
#2
Not Solved
Try as given below.

Code:
Set oShell = CreateObject("WScript.Shell")
sCurrDir=oShell.CurrentDirectory
sCurrentPath=""
pCurrpath=Split(sCurrDir,"\")
For i=0 to ubound(pCurrpath)-2
sCurrentPath=sCurrentPath&pCurrpath(i)&"\"
Next
InputXls=sCurrentPath &"Data\ICentral.xls"
Datatable.AddSheet("ICentral")
Datatable.ImportSheet InputXls,"ICentral","ICentral"
Reply
#3
Not Solved
Hi,
I am still getting the same problem.

still shows generall error.
Regards;
vijay
Reply
#4
Not Solved
It should work with the correction suggested by Sreekanth.
Check your xls path and sheetname again.

Reply
#5
Not Solved
May be you are getting string value instead of integer. Check your DIMs
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  General run error when Exist fails msacks 1 1,866 02-08-2019, 02:12 AM
Last Post: Ankur
  General Object Error(Find Object Error) akhandesh 1 3,612 02-24-2016, 01:05 PM
Last Post: sindhus
Rolleyes The test run cannot continue due to an unrecoverable error neerndg123 3 8,671 09-17-2015, 08:27 PM
Last Post: ananthakumarbe
  HI, i'm having a run time error ,please help? Awzar 0 2,638 01-24-2015, 06:52 AM
Last Post: Awzar
  Browser("BrowserName").Back gives General Run Error... deminiek 13 18,732 12-10-2013, 12:53 AM
Last Post: rizvia

Forum Jump:


Users browsing this thread: 1 Guest(s)