C cjbarron5 Jun 22, 2008 #2 works great as long as the file is open..........did I do something wrong?
R Raymond Jun 22, 2008 #3 Hi Chris, What you need to do is as below coding -- Define the object Dim oExl As Object Dim oSheet As Object -- Open thte Excel.Application in the form Set oExl = CreateObject("Excel.Application") oExl.Workbooks.Open (FileName) Set oSheet = oExl.Sheets(1) -- Then you can read the spreadsheet Myfield in Access = oSheet.Cells(1, 2) etc -- Remember to close the EXCEL after you. oExl.Quit Set oExl = Nothing -- It is very simple and you should able to find some examples in the Internet Wish I can help. Raymond
Hi Chris, What you need to do is as below coding -- Define the object Dim oExl As Object Dim oSheet As Object -- Open thte Excel.Application in the form Set oExl = CreateObject("Excel.Application") oExl.Workbooks.Open (FileName) Set oSheet = oExl.Sheets(1) -- Then you can read the spreadsheet Myfield in Access = oSheet.Cells(1, 2) etc -- Remember to close the EXCEL after you. oExl.Quit Set oExl = Nothing -- It is very simple and you should able to find some examples in the Internet Wish I can help. Raymond
C cjbarron5 Jun 22, 2008 #4 I got it to work now I think my computer was playing a joke on me.......seems to work fine for me now thanks chris bhicks11 via AccessMonster.com said: You mean as long as the spreadsheet is open? It should not have to be open to link to it. Bonnie http://www.dataplus-svc.com works great as long as the file is open..........did I do something wrong? Hi Chris, Click to expand... [quoted text clipped - 9 lines] thanks chris Click to expand... Click to expand... Click to expand...
I got it to work now I think my computer was playing a joke on me.......seems to work fine for me now thanks chris bhicks11 via AccessMonster.com said: You mean as long as the spreadsheet is open? It should not have to be open to link to it. Bonnie http://www.dataplus-svc.com works great as long as the file is open..........did I do something wrong? Hi Chris, Click to expand... [quoted text clipped - 9 lines] thanks chris Click to expand... Click to expand... Click to expand...