Speek cells, barcode scanner

K

Klemen25

Hello

I have to review large amount of documents with bar codes.
I am using a barcode scanner to input data into a column A, it triggers vlookups in the B column, which informs me if the document is to be kept (withreturning long number) or to be destroyed (with returning text "to be kept").

As it is difficult to constantly look up and down to see the vlookup result, I added in column C function "=right" that would extract the last 3 numbers from the vlookup result, and the macro below that would read these numbers through my earphones. With this I would also be able to double check if the account number found is identical to the one on the paper.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Range, c As Range, ir As Range
Set r = Range("C1:C1000")
Set ir = Application.Intersect(Target, r)
If ir Is Nothing Then Exit Sub
For Each c In ir
Target.Speak
Next c
End Sub


But as the "right" function in column C is not saved as number the macro does not read the result (for instance number 356).
Could someone suggest how to solve this issue?
I tried to use paste special values before this macro, but reasonably failed.

Thank you all!
All the best
 
C

Claus Busch

Hi,

Am Tue, 15 Jul 2014 00:11:39 -0700 (PDT) schrieb Klemen25:
But as the "right" function in column C is not saved as number the macro does not read the result (for instance number 356).
Could someone suggest how to solve this issue?
I tried to use paste special values before this macro, but reasonably failed.

Right is a text function and it returns text.
Try:
--Right(....
The double -- change the output to number


Regards
Claus B.
 
K

Klemen25

Interesting :)
It returns number but in the background there is still the function, and the number is not read by the macro...

Thanks anyhow :)
 
C

Claus Busch

Hi,

Am Tue, 15 Jul 2014 01:52:03 -0700 (PDT) schrieb Klemen25:
Interesting :)
It returns number but in the background there is still the function, and the number is not read by the macro...

if you need values instead of formula copy the column and paste it back
as values.


Regards
Claus B.
 

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

Top