Can't get desired event to capture user entry on user form in vba app

J

Jan Krouwer

Hi,

I'm using OWC 9 in an Excel vba application. The code below works. That is,
in an embedded spreadsheet on a user form, the value typed in by a user is
transfered to a second embedded spreadsheet on this form. But this requires
a double click. I can't seem to get this to work when I try to use another
type of event which doesn't require extra user interaction, even though the
event fires (e.g., gRow changes properly). I tried EndEdit among others. Any
ideas?

Private Sub Spreadsheet2_dblClick(ByVal EventInfo As
OWC.SpreadsheetEventInfo)
gRow = frmEnterSpecs.Spreadsheet2.Selection.row
frmEnterSpecs.Spreadsheet3.Cells(gRow, 1).Value =
frmEnterSpecs.Spreadsheet2.Cells(gRow, 4).Value
End Sub
 
J

Jan Krouwer

This works - needed to go to an older MSDN library. With dot net, much of
what was around fairly recently is now legacy.


Private Sub Spreadsheet2_EndEdit(ByVal EventInfo As
OWC.SpreadsheetEventInfo)
gRow = frmEnterSpecs.Spreadsheet2.Selection.row
frmEnterSpecs.Spreadsheet2.Cells(gRow, 4).Value =
CStr(EventInfo.EditData)
frmEnterSpecs.Spreadsheet3.Cells(gRow, 1).Value =
frmEnterSpecs.Spreadsheet2.Cells(gRow, 4).Value
End Sub
 

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