Delete Table from Excel

B

Boss Spearman

I'm trying to delete an access table from Excel.
When I try and delete the table using VBA this message appears:
"Cannot delete this index or table. It is either the current index or
is used in a relationship."
But there is no relationship with this table.
I can delete the table in access with no problem but I need to do it in
VBA.

I have tried to delete the tables by using these two methods.

strSQL = "DROP TABLE tblPrices;"
cnnX.Execute strSQL

vtSql = "DROP TABLE tblPrices"
cmd.CommandText = vtSql
cmd.Execute

Thanks
 
P

Peter Chatterton

I want to copy a Cell with all its properties except for the links, which
are causing problems.

Where would I find more information about this?

Thanks,
Peter
 
P

Peter Chatterton

Sorry, bad question.

My problem was that I was copying a Cell from another Sheet, and that Cell's
Formula referenced that Sheet without giving a Sheet name. So when I copied
it over it seemed to be referencing the current Sheet.

Peter.
 

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