![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 1
|
Mr. Excel,
I am using MS Excel 97 as a data acquisition program. A serial device is sending data to a specific cell (4,6) via DDE. The numeric value of this incoming data varies between 0 and 360. I want to execute a macro when the incoming data (the data in 4,6) becomes equal to a preset constant that I have placed in another cell (4,8). This may be a simple task, but I have not found a working example from the FAQ lists yet. Cordially, Russell Thynes |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
Put the following code in the module for your worksheet that contains the cells in question:
Code:
Private Sub Worksheet_Change(ByVal Target As Range) Set Target = Cells(4, 6) If Target = Cells(4, 8) Then MsgBox "Cells are equal" End Sub _________________ Hope this helps. Kind regards, Al. [ This Message was edited by: Al Chara on 2002-04-10 16:04 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|