• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

worksheet change event only working once

I am using a scanner to scan barcodes on a list (items I am trying to find). I created a worksheet function using case select when case = $F$2, so when the user scans the barcode when the cell F1 is selected, it will execute. every barcode I see I scan and gotes through each one, one after the other. after I think I have scanned all items I was supposed to, I can take the items left over and put them into a missing sheet. so the remaining items get copied to another sheet called Missing. at this point I keep it so i know what I have to look for. Now, i am repeating the exact same process but now instead of the first sheet i am now in the Missing sheet. so when I scan the barcode the first time, the code executes, the second time, it doesn't fully execute. it looks as if it starts, then stalls and now the cell is F4 selected. after this, if I select F1 again, scan the barcode it will run, the next time it won't, then move it again and scan and the code will then execute. does any one know why it won't scan 2 barcodes in a row, when the first sheet did?
 
Greg

Can you please post the file as without seeing the code diagnosis will be near impossible
 
Greg

Can you please post the file as without seeing the code diagnosis will be near impossible
sorry, I can't do that. I initially created to code on the first sheet. it was a change event in cell F2. I then copied the exact code and pasted on a different sheet to perform the exact same thing, but on this sheet it won't run but once and then the change event doesn't seem to work. that about all I can do.
 
Can you post the VBA code associated with the new sheet ?
Especially the first 20'ish lines
 
I can do that on Monday. I hope you can help. it's a really big deal that its not working, it worked before but now its not. so I really appreciate it.
 
I figured it out. so simple. when I protect my sheets the change event that it was linked to was locked under the protection, so excel couldn't select the cell until it was unlocked. so thanks for your support in trying to help me.
 
Good result

Yes, protection stops some worksheet events from occurring
 
Back
Top