Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
marsulein
If objExcel refers to an instance of Excel, how are you creating/assigning it ? If true, then Excel does not have a ".Fields" property. What is objExcelAdd ? I'm a little confused as to what you are trying to do, so please clarify the you want to get data from an Excel sheet in to VB using ADO ? NickHK "marsulein" wrote in message ... 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=""Excel 8.0;HDR=Yes""" objExcelAdd.Open "SELECT * FROM [New To be added$]", cnnExcel, 1, 1 -- marsulein ------------------------------------------------------------------------ marsulein's Profile: http://www.excelforum.com/member.php...o&userid=16064 View this thread: http://www.excelforum.com/showthread...hreadid=275204 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
To store the formula in a string | Excel Discussion (Misc queries) | |||
retrieving data from variable workbooks | Excel Discussion (Misc queries) | |||
Retrieving Cell Data From Variable Files | Excel Worksheet Functions | |||
Retrieving data from Excel and store it into string variable | Excel Programming | |||
Store variable value for Chart | Excel Programming |