[AccessD] Adding an Excel Button and Associated Macro from Access

Darryl Collins darryl at whittleconsulting.com.au
Mon Aug 1 18:28:23 CDT 2011


I agree with this template approach and it is the one I usually use.  Put a template on the server (or where-ever) as a read only file. Call that, populate and away you go.

The advantage of this approach is you can have the XL template stuffed to the gills with code that can be called and controlled from Access VBA as well.   

Nice :)

Cheers
Darryl

-----Original Message-----
From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of 'Steve Goodhall'
Sent: Monday, 1 August 2011 10:56 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Adding an Excel Button and Associated Macro from Access

I think it's possible, but it would be easier if you created an Excel
template that already has the button and the code and then use the
template in your "workbooks.add" statement.  Another way would be to
create a "model" notebook, open it with "workbooks.open" using "read
only" option and then save it with a different name.  Please let me
know if  you need the actual code and I will try to dig it up
tonight. 

	Regards, 
Steve Goodhall, MSCS, PMP 
248-505-5204 

----- Original Message -----
From: Access Developers discussion and problem solving 
To:"Access Developers discussion and problem solving" 
Cc:
Sent:Mon, 1 Aug 2011 07:35:45 -0500
Subject:[AccessD] Adding an Excel Button and Associated Macro from
Access

 I am trying to create a new Excel Workbook from Access. The
Worksheet
 in this Workbook needs to have a button with an associated Macro.

 So far I have been able to create the new Workbook and Worksheet and
add
 the button to the Worksheet. This works nicely.

 However, I can't figure out how to add the Excel Macro from Access.

 Is this possible?

 If so, an example would be most appreciated.

 Thanks,

 Brad

 -- 
 AccessD mailing list
AccessD at databaseadvisorscom [1]
http://databaseadvisors.com/mailman/listinfo/accessd [2]
 Website: http://www.databaseadvisors.com [3]


Links:
------
[1] mailto:AccessD at databaseadvisors.com
[2] http://databaseadvisors.com/mailman/listinfo/accessd
[3] http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list