12-08-2008, 04:32 AM
Run time- working with external data sheet
Hi Everybody,
1)Can any body suggest a proper method of storing and retrieving values from external excel sheet during run time.
2) And also proper syntax to pass file path as a parameter in calling function.
'I am using function below
--
'Here I count the rows and trying to use string compare function
------
appExcel.quit
a) I keep on getting syntax error in the called function (Expected ")" statement)
and if I change the syntax to path ExternalData "<C:\book1>","<Global>" The file does not Exist. What is the proper syntax for passing the file path as a parameter to the function.
Hi Everybody,
1)Can any body suggest a proper method of storing and retrieving values from external excel sheet during run time.
2) And also proper syntax to pass file path as a parameter in calling function.
'I am using function below
Code:
ExternalData(C:\book1,Global)
ExternalData(FilePath,Strsheetname)
Dim appExcel
Set appExcel = CreateObject("Excel.Application)
Set Objbook= appExcel.Workbooks.Open(Strsheetname)
Set objsheet = appExcel.Sheets(Strsheetname)
'Here I count the rows and trying to use string compare function
------
appExcel.quit
a) I keep on getting syntax error in the called function (Expected ")" statement)
and if I change the syntax to path ExternalData "<C:\book1>","<Global>" The file does not Exist. What is the proper syntax for passing the file path as a parameter to the function.