PC Review


Reply
Thread Tools Rate Thread

Best way to send disparate cells to database

 
 
axwack
Guest
Posts: n/a
 
      14th Nov 2007
I have a spreadsheet where cells are interspersed through out the a
spreadsheet.

I need to keep track of the cells that changed and send them in batch
to a database to update...what would be best way to do this?

 
Reply With Quote
 
 
 
 
Colby Africa
Guest
Posts: n/a
 
      14th Nov 2007
Hello,

Write code to handle the Worksheet_Change event:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)


End Sub

The Target parameter will be the cell(s) that have changed. From
here it is straightforward to maintain a data structure (such as an
array) of changed ranges.

Hope this helps.

Colby Africa
http://colbyafrica.blogspot.com

 
Reply With Quote
 
axwack
Guest
Posts: n/a
 
      19th Nov 2007
On Nov 14, 3:44 pm, Colby Africa <colby.afr...@gmail.com> wrote:
> Hello,
>
> Write code to handle the Worksheet_Change event:
>
> Private Sub Worksheet_SelectionChange(ByVal Target As Range)
>
> End Sub
>
> The Target parameter will be the cell(s) that have changed. From
> here it is straightforward to maintain a data structure (such as an
> array) of changed ranges.
>
> Hope this helps.
>
> Colby Africahttp://colbyafrica.blogspot.com


Thanks for your help Colby...

Would you send a set of cells or each cell iteratively? Looks like
it's just the Range of cells. Is there a bit to tell if cells have
changed?
 
Reply With Quote
 
Colby Africa
Guest
Posts: n/a
 
      19th Nov 2007

Hi there,

I am sorry, the event to write code for is actually Worksheet_Change!

The Target range will have as many cells as makes sense for the action
that caused the event to fire. For example, if you just change the
value of one cell, the event will fire with Target.Cells.Count = 1,
but if you do a fill down of a value to 9 cells below the original
cell, the event will fire once with Target.Cells.Count = 9.

Hope that makes sense!

Colby


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare disparate data using C# scarpacci Microsoft C# .NET 1 19th Oct 2009 04:35 AM
Disparate record counts Mark Microsoft Access 4 27th Mar 2008 05:59 PM
trying to add up disparate transaction data =?Utf-8?B?YmlsbCBhZGtpbnM=?= Microsoft Excel Worksheet Functions 4 17th Sep 2006 11:59 PM
trying to add up disparate transaction data =?Utf-8?B?YmlsbCBhZGtpbnM=?= Microsoft Excel Worksheet Functions 0 17th Sep 2006 10:19 PM
using ReadXML with disparate XML data =?Utf-8?B?Sm9l?= Microsoft ADO .NET 2 31st Mar 2005 03:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:58 AM.