Hi,
You can store the value in a string i.e.,
That's it .. this code will definitely work
You can store the value in a string i.e.,
Code:
Step 1:Set objExcel = CreateObject("Excel.Application")
Step 2:Set objWorkbook = objExcel.WorkBooks.Open("D:\TestData.xls")
Step 3:Set objDriverSheet = objWorkbook.Worksheets("Sheet1")
If Cell A1 stores the value = "A","B","C", "D"
Step 4: datataken = objDriverSheet.Cells(1, "A").value
Now datataken will store "A","B","C", "D"
split this text with split function in vb as
Step 5: dataarray = split(datataken,",",-1)
Step 6:Var1= dataarray(0)
Step 7:Var1= dataarray(1)
Step 8:Var1= dataarray(2)
Step 9:Var1= dataarray(3)