469,580 Members | 2,031 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,580 developers. It's quick & easy.

Exporting Query Data from Access 2003 to Excel 2003

Hello all,

I have data, which is separated into account numbers (ie. 10, 20, 30), but it exists in one query. Right now, I have an access macro "transferspreadsheet," which is exporting all the account numbers into one worksheet.

My question:

How can I go about exporting data from the query into excel, so that each different fund number has it's own worksheet and it's corresponding data?

Thank you. Your assistance would be greatly appreciated.
Jul 31 '07 #1
2 1865
Sub Holdings()
'
' Macro1 Macro

'


Sheets("Fund_Numbers").Select
Range("A1").Select
Counter = 0
Do Until ActiveCell = ""

Sheets("Fund_Numbers").Select
ActiveCell.Offset(1, 0).Select
If ActiveCell = "" Then Exit Do
Selection.Copy
Sheets.Add
ActiveSheet.Paste Destination:=ActiveSheet.Range("A1")
ActiveSheet.Name = Range("A1")
Counter = Counter + 1

Loop


End Sub


So this code in excel will give me all the fund numbers which I exported from Access. I also exported all the data in my database through the transfer spreadsheet. Now I need to have the macro go into the other spreadsheets and extract that information and paste it into the new spreadsheets I created. I know this is more excel now, but any help would be appreciated.
Jul 31 '07 #2
One way to do this is to query from Excel.
I posted it here.
http://www.thescripts.com/forum/thread686051.html

It's different but it work for me!!

-- Boxcar
Jul 31 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

21 posts views Thread by bobh | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.