View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
marsulein[_2_] marsulein[_2_] is offline
external usenet poster
 
Posts: 1
Default Retrieving data from Excel and store it into string variable


Dim strTemp As String
Dim objExcel As Object
Dim cnnExcel As String

strTemp = objExcel.Fields("Resource").Value


I open the connection this way:

cnnExcel = "driver={Microsoft Excel Driver (*.xls)};" & _
"dbq=<*some path*;" & _
"Extended Properties=""Exce
8.0;HDR=Yes"""

objExcelAdd.Open "SELECT * FROM [New To be added$]", cnnExcel, 1,

--
marsulei
-----------------------------------------------------------------------
marsulein's Profile: http://www.excelforum.com/member.php...fo&userid=1606
View this thread: http://www.excelforum.com/showthread.php?threadid=27520