Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need to read external workbook
Hi, I am right now working Excel using VBA. I am using DAO for reading a external sheet data. I am not getting the output. Can some one hel me in fixing this problem. Following is the code snapshot: Set rs = db.OpenRecordset("SELECT * from Instruction") If rs Is Nothing Then MsgBox "Can't open the file!", vbExclamation ThisWorkbook.Name db.Close Set db = Nothing Exit Sub End If Here 'rs' is returning null. I am trying to open a work sheet name 'Instruction' from an external workbook file. Could you please let m know the exact syntax for accessing the sheet information using DAO. And also how to refer column header in the 'SELECT' query if the colum names have words separated by space. For example "Project Name" is th column header name separated by space. And any good DAO using VBA lin will also help me. Thanks in advance! Rav -- smilysof ----------------------------------------------------------------------- smilysoft's Profile: http://www.excelforum.com/member.php...fo&userid=3270 View this thread: http://www.excelforum.com/showthread.php?threadid=52529 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to read external cell? | Excel Programming | |||
Search and read registry for particular external application | Excel Programming | |||
How to read active Excel celll value by external vb application? | Excel Programming | |||
Excel Gurus = want a macro in 1 workbook to get info from another workbook = Read please | Excel Programming | |||
Read variables from external file | Excel Programming |