Excel

N

nath

I am trying to open an excel workbook as an object from
Access. using set xl = createobject("Excel.application")

this works fine, how ever, i need to add and rename sheets
within this book.

i have tried.

xl.activeworkbook.sheets.add

but i cant get it to work.

any ideas.

TIA

Nath
 
N

Neil

Nath,

Try opening a workbook first and then adding to that. I am not too sure if
creating the Excel Application using CreateObject automatically creates a
new workbook (think this is why you are having a problem).

HTH,

Neil.
 
K

Ken Snell

The CreateObject method will start EXCEL, which I believe always starts with
a blank workbook (no saved name).

Check the EXCEL newsgroups for more details, but here is how you add a new
workbook:

xl.Workbooks.Add
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top