J
Jack
Hello,
I've asked that question before but that thread appears dead now.
My applications is developed in vbasic5.
I need for it to get Windows notification when user clicks on the cell and
retrieve the cell value.
I did exactly as Rob van Gelder advised me in the another thread.
1. I installed Excel and load the reference to Excel Object Library in my
vbasic5 code.
2. I created Class1 module and put the following code in there.
---------------
Public WithEvents app As Excel.Application
Private Sub app_SheetSelectionChange(ByVal Sh As Object, ByVal Target As
Range)
MsgBox "Selection Changed"
End Sub
--------------------
3. I put the another code in Form_Load of my app:
--------------------
Dim cls As New Class1, wkb As Excel.Workbook
Set cls.app = New Excel.Application
Set wkb = cls.app.Workbooks.Add
wkb.Worksheets(1).Cells(10, 10).Select
MsgBox ActiveCell.Value
wkb.Close
cls.app.Quit
Set cls.app = Nothing
Set cls = Nothing
-------------------
When I start my app I have message: "Selection changed" (although I did
nothing to my Excel sheet) followed by the empty message box (MsgBox
ActiveCell.Value).
When I select another cell in Excel there is not any notification my app is
aware of.
It looks like ActiveCell.Value is not able to retrieve the cell value
What I need is:
1. Get notified the user clicked on Excel cell
2. Retrieve the value of that cell
Please help,
Jack
I've asked that question before but that thread appears dead now.
My applications is developed in vbasic5.
I need for it to get Windows notification when user clicks on the cell and
retrieve the cell value.
I did exactly as Rob van Gelder advised me in the another thread.
1. I installed Excel and load the reference to Excel Object Library in my
vbasic5 code.
2. I created Class1 module and put the following code in there.
---------------
Public WithEvents app As Excel.Application
Private Sub app_SheetSelectionChange(ByVal Sh As Object, ByVal Target As
Range)
MsgBox "Selection Changed"
End Sub
--------------------
3. I put the another code in Form_Load of my app:
--------------------
Dim cls As New Class1, wkb As Excel.Workbook
Set cls.app = New Excel.Application
Set wkb = cls.app.Workbooks.Add
wkb.Worksheets(1).Cells(10, 10).Select
MsgBox ActiveCell.Value
wkb.Close
cls.app.Quit
Set cls.app = Nothing
Set cls = Nothing
-------------------
When I start my app I have message: "Selection changed" (although I did
nothing to my Excel sheet) followed by the empty message box (MsgBox
ActiveCell.Value).
When I select another cell in Excel there is not any notification my app is
aware of.
It looks like ActiveCell.Value is not able to retrieve the cell value
What I need is:
1. Get notified the user clicked on Excel cell
2. Retrieve the value of that cell
Please help,
Jack