LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How can I use VBA to SubTotal

I export data from Access to Excel.

I need the data to "automatically" subtotal so the user isn't required to.

Apparently Access cannot export to an Excel template file so the following is
what I currently do (followed by what I still need).

Currently:
1. The WorkBook
FileName: "CallDetail.xls"
WorkSheet: "Weekly Calls"
Named Range: "Weekly Calls" ($B$1:$C$2) the range is dynamic based on
the size of the incoming data.
Row 1 is the header row with formatting in place

2. Access exports the data using:
stDocName = "CallDetail.xls"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"qryCallDetail", stDocName, , "WeeklyCalls"
Application.FollowHyperlink stDocName, , True

3. The data is inserted into CallDetail.xls beginning in the first cell of
the named range

4. The range "WeeklyCalls" is adjusted to accomodate all imported data.

What I need help with:
1. Return the file "CallDetail.xls" to its original (pre-export) condition.
2. Name the new file (with the exported data) "CallDetail mmddyy.xls" (where
mmddyy is Date())
3. Subtotal data for each break in Column A (Technician), Sum Column D
(Duration)

Thanks for your help!

--
---
TraciAnn

Message posted via http://www.officekb.com

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subtotal To Include Item Description On Subtotal Line Tickfarmer Excel Discussion (Misc queries) 2 February 23rd 10 07:56 PM
pasting to subtotal lines without replacing hidden -non-subtotal l harleydiva67 Excel Discussion (Misc queries) 1 October 12th 06 06:02 PM
Bolding the subtotal lines automaticlly When using the Subtotal fu 06Speed6 New Users to Excel 2 October 5th 06 03:52 PM
Subtotal of Subtotal displays Grand Total in wrong row Thomas Born Excel Worksheet Functions 5 January 6th 05 01:46 PM
Sort, Subtotal, Label Subtotal, Insert row Teak Excel Programming 2 April 8th 04 04:14 PM


All times are GMT +1. The time now is 08:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"