[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UltraMacros Loop Limitation



Hello,

To read the bottom row number of a spreadsheet (last row containing
data), use peekword $80FD.

To read the current row number of the spreadsheet, use peekword $00AB:

A:<all
       Currow = peekword $00AB:        	// test the bottom
       Lastrow = peekword $80FD:

       if C = L  bell bell bell stop: endif:      // at bottom, so stop

       x=peek #worktype:               // Peek $8290

       if x>128 up goto sa-B:    // Value; greater than 128

       else down rpt>!            // Down to the next row, try again

If bit 7 of peek $8290 (peek #worktype) is set, the value of peek $8290
would be greater than 128 (or to be more precise, greater than 127, but
128 works in this case because certain other bits are always set).  A
Value is greater than 127, Label less than 128.

Other bits in peek $8290 are for cell formatting (decimals, commas,
currency, date, percent, etc.) ; whether protection is on (values only,
labels only, nothing, etc.); and whether a label is propogated. like
-------.  All of those settings add up to less than 128. Bit 7, which
adds 128 to all those other settings, tells us it a Value only.

I hope this makes sense. I do not have an Apple hooked up to my PC, so
I have to walk back and forth between rooms to test this.

Hello also to Michael -- yes, we are just great. Thank you for asking.

Beverly Cadieux
TEXAS II an International newsletter for users of AppleWorks® 5.1