How to to catch embeded worksheet events in a host program (Access in my case) ?

P

Patrice Ongla

Hi everybody

I've got a problem with using OLE automation between an Access form and an
Excel Worksheet.
I've inserted an Excel Worksheet in an Access form. I can manage my
worksheet easily with VB code from Access. It works fine. But what I'm
trying to do now is to be able to catch my worksheet events in the VB code
of the form.
For exemple, I'd like to update a field in the form when user update a cell
in the worksheet.
My workseet name is "XLS_WS". So I've declared a sub like that :
Private Sub XLS_WS_SheetChange(Sh As Object, Target As Range)
But it isn't recognized by VB as an event sub and it doen't appen anything
when I update a cell.
I think of an other solution : I could update my access form from Excel. But
i don't know eather how to retrieve the container (the Access form in my
case) and the field I want to update in.

Ideas ?

Thanx in advance.

PO
 

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