xlCellTypeLastCell not working from Access

S

Santiago Gomez

Hello,

I am exporting data from access to excel.
I want to get the last cell to use in the graph range, but it seems like
access doesnt go to the excel application as it run this code, so nothing
happens.

rngLastCell = ActiveCell.SpecialCells(xlCellTypeLastCell).AddressLocal

If I debug and stop it just before this line, and select the excel app
manually, it works.

can anyone tell me what I need?

thanks
 
H

Helmut Weber

Hi Santiago,
this has nothing to do with word.
But anyway. In case of late binding, that is
without a reference to the excel library,
access doesn't know what to do with the constant
xlCellTypeLastCell. Try 11 (number) instead.
Greetings from Bavaria, Germany
Helmut Weber
"red.sys" & chr$(64) & "t-online.de"
Word XP, NT 4.0
 
S

Santiago Gomez

oops, I thought I was in the Access group. My apologies.

Thanks for the answer though.

I am looking forward to the next world cup! :)
 

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