ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to to catch embeded worksheet events in a host program (Access in my case) ? (https://www.excelbanter.com/excel-programming/272771-how-catch-embeded-worksheet-events-host-program-access-my-case.html)

Patrice Ongla

How to to catch embeded worksheet events in a host program (Access in my case) ?
 
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






All times are GMT +1. The time now is 03:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com