Best way to send disparate cells to database

  • Thread starter Thread starter axwack
  • Start date Start date
A

axwack

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?
 
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
 
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?
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top