Please Help..Excel Automation..VFP9..Excel 2003

Author: gerald foote

Posted: 2011-02-03 at 15:44:50

Everything was going fine and then I added barcods in the format

"0001","0002" ect

Now the find command locates the first record with "0001" so a barcode

"8991202000123" is found

I understand that there are aruguments to the find command such as

wholewords but I cannot figure out how

To code for that.

I hope you can see my problem and explain how to correct the syntax.

Thanks Jerry

Select UPINVENTORY

Scan

Target=Alltrim(UPINVENTORY.BARCODE)

Found=.F.

Try

rowrange="B1:B"+Transform(Thisform.MAXROW.Value)

=====================================================================

Found=Thisform.oExcel.Range(rowrange).Find(Target).Select

=====================================================================

Endtry

If Found

LAST_ADDRESS = Thisform.oExcel.ActiveCell.Address

LAST_ROW = Thisform.oExcel.ActiveCell.Row

Column=Alltrim(UPINVENTORY.colname)

NEW_ADDRESS="$"+Transform(Column)+"$"+Transform(LAST_ROW)

Thisform.oExcel.Range(NEW_ADDRESS).NumberFormat =

"0.00"

If Thisform.upinventry.Value=2

newvalue=Thisform.oExcel.Range(NEW_ADDRESS).Value

If ! Isnull(newvalue)

Thisform.oExcel.Range(NEW_ADDRESS).Value =newvalue+UPINVENTORY.quanity

Else

Thisform.oExcel.Range(NEW_ADDRESS).Value = UPINVENTORY.quanity

Endif

Else

Thisform.oExcel.Range(NEW_ADDRESS).Value

= UPINVENTORY.quanity

Endif

Else

Endif

Endscan

--- StripMime Report -- processed MIME parts ---

multipart/alternative

text/plain (text body -- kept)

text/html

---

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/D756684BC1E241E39B9BA03FC1C99863@laptop

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2011 gerald foote