Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Need VBA to delete row and subtotal

Due to limitations in Access when exporting from Access to Excel, I need to
automate a process when the exported file is opened the first time after the
export.

Apparently Access cannot export to an Excel template file so the following is
what I currently do and what still needs to be done.

Current:
1. A named Excel workbook "CallDetail.xls"

2. A named range ($B$1:$C$2), "WeeklyCalls" the range is dynamic based on the
size of the incoming data.

3. A single worksheet "WeeklyCalls"

4. Row 1 is the header row with formatting in place

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

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

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

Needed:
1. Since Access cannot export to a template, I need the initial file
(CallDetails.xls) to remain "untouched", saving the exported data to a file
name of the format "CallDetail mmddyy.xls"

2. Access exports column headers as the first row. Since these headers are
not user friendly names and do not contain formatting, Row 2 should be
deleted.

3. Subtotal data for each break in Column A (Technician), Sum Column D
(Duration)

End Result:
After executing the command in Access which exports the data to an existing
workbook "CallDetail.xls" and then opens the workbook, the Excel procedures
needs to be seamless to the user.

What is the best way to execute the steps under "Needed"?

Thanks everyone for your help!

--
---
TraciAnn

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200908/1

Reply
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
Should i delete heading/subtotal rows when consolidating? Grace gg Excel Discussion (Misc queries) 0 August 15th 08 05:53 PM
Subtotal macro and delete original data ExcelNovice Excel Programming 3 January 2nd 08 12:18 AM
subtotal copy-paste and delete hidden rows Winslow Excel Discussion (Misc queries) 1 December 12th 06 03:26 PM
first Autofiltering, then subtotal one column, copy value to first row and delete rest [email protected] Excel Programming 0 March 24th 06 07:38 PM
Subtotal of Subtotal displays Grand Total in wrong row Thomas Born Excel Worksheet Functions 5 January 6th 05 01:46 PM


All times are GMT +1. The time now is 06:33 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"