Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Managing User Changes
Hi,
I am using VB.NET and have an app that does a DB query and displays the results in excel. I want the app to monitor where the results are stored ie. if the user inserts columns or rows the app still knows where the original data is stored. I can use the SheetChange event to monitor when a cell is changed, but I am unsure about the best way to do this, particularly when the event is fired for both the cut and paste operations. Should I 'catch' the cut, store the details of contained cells, then 'catch' the paste and update my app then? If so, how can I tell what the user has done? Is there something saved somewhere to highlight the operation? Thanks for any help, Peter. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Managing User Changes
Create a defined name that refers to the cell, then you can use that defined
name to refer to the cell. Turn on the macro recorder while you do it manually to get the code. Insert=Name=Define Name: Range1 Refersto: =Sheet1!$B$9 then in code msgbox Range("Range1").Address & " - " & Range("Range1").Value -- Regards, Tom Ogilvy "Peter" wrote in message ... Hi, I am using VB.NET and have an app that does a DB query and displays the results in excel. I want the app to monitor where the results are stored ie. if the user inserts columns or rows the app still knows where the original data is stored. I can use the SheetChange event to monitor when a cell is changed, but I am unsure about the best way to do this, particularly when the event is fired for both the cut and paste operations. Should I 'catch' the cut, store the details of contained cells, then 'catch' the paste and update my app then? If so, how can I tell what the user has done? Is there something saved somewhere to highlight the operation? Thanks for any help, Peter. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Managing add-ins via the registry | Setting up and Configuration of Excel | |||
Managing bad data | Excel Discussion (Misc queries) | |||
Managing a big report | Excel Discussion (Misc queries) | |||
MANAGING MACROS | Excel Programming | |||
MANAGING PRICELISTS | Excel Programming |