Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help needed after changing code plz
#1
Hi there,

I used some code what i found on this forum, i adapted it a little bit but i cannot get results:


str s=found
out s
mes s
ARRAY(str) h
ExcelSheet es1.Init
int sheet1 row col found
for(sheet1 1 sheet1+1)
es1.Init(sheet)
es1.GetCells(h)
for row 0 h.len(2)
for col 0 h.len(1)
if(h[col row]=s) found=1; goto g1
g1
if(!found) mes "not found"; ret
mes "sheet %i, row %i, column %c" "" "i" sheet1 row+2 'A'+col

Everytime i get a 'not found message' but the thing i'm searching for is definately in the sheet.

When i create a new macro and run it from there and change s="hello" it works perfectly

Does somebody see a mistake or something?
The str s=afound should populate s with the earlier found results it is an ARRAY(str) something with this maybe?

Plz help me
#2
Try

s=afound[0]
#3
THX gintaras,

I thought i did try this but probably not, it works now.

I have a additional question, is it possible to set the cells colour?

If yes could you give me an example please?

Anyhow i'm very pleased with your help... THX again Big Grin


Forum Jump:


Users browsing this thread: 1 Guest(s)