Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Managing add-ins via the registry Athos Setting up and Configuration of Excel 0 February 5th 09 01:00 PM
Managing bad data hasn7 Excel Discussion (Misc queries) 2 May 18th 06 10:53 PM
Managing a big report nbeaird Excel Discussion (Misc queries) 0 March 16th 05 03:25 PM
MANAGING MACROS angie Excel Programming 1 February 11th 04 09:36 AM
MANAGING PRICELISTS angie Excel Programming 3 February 3rd 04 02:50 PM


All times are GMT +1. The time now is 05:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"