View Single Post
  #3 (permalink)  
Old September 1st, 2006, 10:30 AM
pjm pjm is offline
Authorized User
 
Join Date: Jul 2006
Location: Boston, MA, USA.
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here's a snippet of some code that I used to read results from an Excel-based questionnaire
into an Access database.

    Dim rs As Recordset
    Dim xlWb As Excel.Workbook
    Dim xlWs As Excel.Worksheet

    Dim xlsFileWithPath as string
    Dim FieldName as string
    Dim Refs as string

        Set xlWb = xlApp.Workbooks.Open(xlsFileWithPath)
        Set xlWs = xlWb.ActiveSheet

        rs(FieldName)= xlWs.Range(Refs).Value & ""


-Phil-
Reply With Quote