Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SendKeys To Copy Pivot Table View and Paste Into Excel

Status
Not open for further replies.

Du2good

Technical User
May 9, 2005
41
US
Boss wants two reports on same Excel tab.

1st report works great and is saved to Excel using:
DoCmd.OutputTo acOutputQuery, "qryIncoming", "MicrosoftExcelBiff8(*.xls)", "X:\Incoming Daily.xls", False, "", 0

2nd report is a query in PIVOT TABLE VIEW.
Since pivot tables wont export without losing formatting (If they did I'd copy from one tab to another.) I want to select the pivot table, using
sendkeys "CTRL + A", then copy the query
in pivot table view using sendkeys "CTRL +C"
and then paste into cell A25 (always A25)
maintaining the PIVOT TABLE VIEW .
If I can do this using the keyboard can it be done using VBA?

I'm able to reference the workbook, format cells, and navigate to the cell that I want to paste to, but that is it.

Merry Christmas!!

Du2Good
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top