G
Guest
Our office receives a report in Excel that combines information for 13
different offices. We have been manually splitting the Excel spreadsheet
into 13 different spreadsheets. I am trying to automate that process.
I am using Access and Excel 2003. I have linked the spreadsheet to access
and written the queries to separate the information. Now I want to export
the queries to a spreadsheet (one query per spreadsheet, so it can be emailed
to the individual offices.)
I was able to write a macro that created the spreadsheets, but I am unable
to format the spreadsheets without opening each one. So I wanted to try my
hand at VBA (I have very limited experience with Access VBA, but moderate
experience in Word and Excel VBA). I see information regarding the
transferspreadsheet method, but so far have not had any luck.
Specifically what I want to do is export a query called qryAlex1000Days and
create a spreadsheet called Alex 1000 Days.xls in a folder called
C:\workload\1000 Days. Then I want to format the spreadsheet so that each
column is expanded to fit the information and resave it. I don't need
anything fancy, I just need to have the columns expanded. (then I will need
to do this 12 more times for the other 12 offices (different query names and
create a different file in the same folder listed above.)
Any help would be greatly appreciated.
Elaine
different offices. We have been manually splitting the Excel spreadsheet
into 13 different spreadsheets. I am trying to automate that process.
I am using Access and Excel 2003. I have linked the spreadsheet to access
and written the queries to separate the information. Now I want to export
the queries to a spreadsheet (one query per spreadsheet, so it can be emailed
to the individual offices.)
I was able to write a macro that created the spreadsheets, but I am unable
to format the spreadsheets without opening each one. So I wanted to try my
hand at VBA (I have very limited experience with Access VBA, but moderate
experience in Word and Excel VBA). I see information regarding the
transferspreadsheet method, but so far have not had any luck.
Specifically what I want to do is export a query called qryAlex1000Days and
create a spreadsheet called Alex 1000 Days.xls in a folder called
C:\workload\1000 Days. Then I want to format the spreadsheet so that each
column is expanded to fit the information and resave it. I don't need
anything fancy, I just need to have the columns expanded. (then I will need
to do this 12 more times for the other 12 offices (different query names and
create a different file in the same folder listed above.)
Any help would be greatly appreciated.
Elaine