By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,915 Members | 1,349 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,915 IT Pros & Developers. It's quick & easy.

Access Excel Automation Question

P: n/a
How controllable from Access VBA is Excel? I'm currently using automation
to dump 2 columns of data into an Excel spreadsheet so that the end user can
create a line graph based on it. Could the line graph be created from
Access as part of the automation process? Is it also possible to rename the
Excel worksheets from Access?

Thanks.

Keith.
Mar 28 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Wed, 28 Mar 2007 10:21:26 +0100, "Keith Wilby" <he**@there.com>
wrote:

Yes, thanks to the power of Automation.
Once you have a reference to Excel.Application, you can use its entire
object model to do anything you want.
Tip: install Excel in its entirety, including the VBA help file.
Tip: use the Macro recorder in Excel to see what it would use to
create a line graph or rename a doc.

-Tom.

>How controllable from Access VBA is Excel? I'm currently using automation
to dump 2 columns of data into an Excel spreadsheet so that the end user can
create a line graph based on it. Could the line graph be created from
Access as part of the automation process? Is it also possible to rename the
Excel worksheets from Access?

Thanks.

Keith.
Mar 28 '07 #2

P: n/a
"Tom van Stiphout" <no*************@cox.netwrote in message
news:oa********************************@4ax.com...
On Wed, 28 Mar 2007 10:21:26 +0100, "Keith Wilby" <he**@there.com>
wrote:

Yes, thanks to the power of Automation.
Once you have a reference to Excel.Application, you can use its entire
object model to do anything you want.
Tip: install Excel in its entirety, including the VBA help file.
Tip: use the Macro recorder in Excel to see what it would use to
create a line graph or rename a doc.
Thanks Tom, I'll give it a go.

Keith.
Mar 28 '07 #3

P: n/a
"Tom van Stiphout" <no*************@cox.netwrote in message
news:oa********************************@4ax.com...
On Wed, 28 Mar 2007 10:21:26 +0100, "Keith Wilby" <he**@there.com>
wrote:

Yes, thanks to the power of Automation.
Once you have a reference to Excel.Application, you can use its entire
object model to do anything you want.
Tip: install Excel in its entirety, including the VBA help file.
Tip: use the Macro recorder in Excel to see what it would use to
create a line graph or rename a doc.
OK I'm stuck on something that should be really simple - I want to create a
new worksheet and give it a specific name. The best I can come up with is

With objXL.Sheets.Add
.Name = "Boat " & Me.cboBoat
End With

but this adds TWO sheets, one with the name I want and one name "Sheet n" -
any ideas?

Many thanks,
Keith.
Mar 29 '07 #4

P: n/a
"Keith Wilby" <he**@there.comwrote in message
news:46**********@glkas0286.greenlnk.net...

Never mind, penny has dropped :-)

objXL.Sheets.Add
objXL.ActiveSheet.Name = "Boat " & Me.cboBoat.Value

Keith.
Mar 29 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.