PDA

View Full Version : VBA to update Database



sswcharlie
05-12-2011, 06:54 PM
Hi

A model railroad project. RFID tag on each item of rolling stock, when it passes different 'readers' its location(identity) can be determined.

I have RFID tag readings going into a spreadsheet. Each reading has an identifier as to which sheet I want to place it in. I have a sheet for each identity. So - all readings come into sheet1 in a single column. There could be one or more readings in that column at any one time.

I now want to shift the reading from sheet1 into say sheetA or sheetB or sheet H etc. (identities)

Firstly I have to delete the same 'tag reading' from the identity sheets (A,B,H, etc) so that when the new reading is placed into one of the identity sheets it is the only reading with that # in the sheets.

I need now to put the new reading into the correct identity sheet, then delete the reading from Sheet1 (where it was placed when it was read)

Then go to next reading in Sheet1 and action as above.

Now should this be triggered by an event (entry in Sheet1?) or by running the macro every 60secs etc.

I would like to receive advice on which way to approach this and the order in which it should be done. I may need to get back to you if I get stuck. (its called old age!)

Thankyou

Charlie
Retired, but mostly tired!

Bob Phillips
05-13-2011, 12:24 AM
Seems straight-forward, but can you post a workbook for us to work with.

sswcharlie
05-13-2011, 02:16 AM
Hi

Thanks for that. Will upload in a day or so.

Thks

Charlie

sswcharlie
05-14-2011, 01:41 AM
Hi Guys

Thanks for your interest.

I have uploaded the file. It has a lot of comments to help (I hope)

Appreciate your comments.

Charlie
New Zealand