473,385 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Access Excel Automation Question

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
4 2735
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
"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
"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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Mark Day | last post by:
Hi All, I am using Access 2000 to generate over 40 Excel charts and pivot tables using early binding to the Excel 9.0 object library. I am finding that if I show the Excel object while processing...
12
by: Cheval | last post by:
Has anyone had any problems with inter-office automation between MS Word and MS Access in Office 2003? I have recently installed office 2003 in a new folder and have left the older office 2000...
8
by: Colleyville Alan | last post by:
I have been working on an Access app that takes info from a file and writes it to a spreadsheet on a form, simultaneously saving the spreadsheet to Excel. I got the idea that the same concept...
7
by: taylor.bryant | last post by:
I am running: Win XP SP2 Excel 2002, Access 2002 (Office XP SP3) Using Visual Basic (not VB.NET) At one point (prior to XP SP2?!? - I can't pin it down), this did not happen and I was easily...
2
by: Robert | last post by:
Hi I'm doing program in Visual C++ 6 How to export whole MS Acces table to MS Excel in Visual Basic 6 there is a command 'DoCmd.TransferSpreadsheet' (OLE automation) but I don't know how to use...
12
by: D. Shane Fowlkes | last post by:
This most likely belongs in another forum but I thought I'd start here. I have a COM Object written in VB6. The DLL will access MS Excel and use it's Object Library to write a customized report...
3
by: James Wong | last post by:
Dear all, I have an old VB6 application which can create and access Excel object. The basic definition statements are as follows: Dim appExcel As Object Dim wkb1 As Excel.Workbook Dim wks1...
3
by: hayuti | last post by:
Hi there This Question was posted on a wrong site. Just as introduction I am working in Access VBA where I coded a routine to retrive data from Access Database, exporting it on to Excel file...
12
by: slinky | last post by:
Can an Excel spreadsheet or a section of one be embedded into an Access form and serve as a subform from which other parts of the Access form can get data? Thanks!
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.