I have the following partly completed vba code for access 2003 to populate data from three tables into three worksheet(s)...
How every I need to complete the vba in order for it to function correctly...I.e take the data from each of the access tables and paste it into the following worksheets Same workbook.
The range in each worksheet(s) is as follows:-
Worksheet 1: range a1:f12
Worksheet 2: range b1:g8
Worksheet 3: range a1:h14
Vba code is:
Private Sub export_data()
docmd set warnings false
docmd.transferspreadsheet acexport, 8, "xxx1","file path\file name1.xls",true
docmd.transferspreadsheet acexport, 8, "xxx2","file path\file name2.xls",true
docmd.transferspreadsheet acexport, 8, "xxx3","file path\file name3.xls",true
Dim xlapp as excel.application
Dim xlbook as excel.application
Dim xlsheet as excel.application
Dim filepath as string
Filepath ="filepath\file name1.xls" this is the final destination of the template workbook housing the worksheets.
Set xlapp = new excel.application
Xlapp.visible = false
Xlapp.displayalerts = false
Set xlbook = xlapp.workbook.open(filepath)
Not sure what goes here to populate the data into the specified range as above...