Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 16th, 2006, 06:07 PM
Registered User
 
Join Date: Nov 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access data to Excel Template

Hello

I have used VBA to export a recordset to an Excel template and save the file as an .xls. However, when I open the Excel file the workbook is hidden. I use the Menu;Window:Unhide command to Unhide the workbook

My code is straight forward but I must be missing something.

Thanks for any help you can give me.


 
Old November 22nd, 2006, 12:38 AM
Authorized User
 
Join Date: Nov 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

One thing I do is use the open event in excel so when you open the file it pulls from excel (instead of pushing from access)

open excel > goto tools / macro / vb editor > click on this workbook and on the top left combo click workbook and on the top right click open you should have this:

Private Sub Workbook_Open()
   Stop
End Sub

...where it says stop type in the code, i tested it and it hit stop right away when i opened it. All you have to do then is open the file from access, the code will trigger even if opened from access. Save the file as a template, just an idea.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Data transfer from Access to Excel swaroop Access VBA 2 June 1st, 2007 10:30 AM
Data from excel to access Vision G Access 3 June 14th, 2006 09:05 AM
Converting excel data to Access using excel VBA ShaileshShinde VB Databases Basics 1 April 26th, 2006 07:57 AM
How to export SQL RS data to Excel template johnilett BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 August 4th, 2005 03:39 AM
Moving data from Excel to Access ChrisWalsh Excel VBA 1 April 14th, 2005 12:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.