Full Version: Display specific excel worksheet on a form
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
Wolvesbug
Hi Guys,

I would like to be able to display/edit a specific excel worksheet on an access form. The location of the workbook would be the same everytime, however, the name of the worksheet would be obtained from a form control. Is this possible? If so how do I do it?

Thanks

M@
Larry Larsen
Hi
Don't think you can actualy display it within a form but you sure can link:
CODE


Public Sub LinkSpreadsheet()

'

' Purpose:      To link a spreadsheet into Access

' Arguments:    none

' Returns:      none



    ' This links the spreadsheet into Access as though it was a table

    DoCmd.TransferSpreadsheet acLink, acSpreadsheetTypeExcel9, "tblImportTestData", "C:\TestSheet.xls"

End Sub

thumbup.gif

Edited by: Larry Larsen on Thu Feb 5 5:45:15 EST 2009.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.