home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / demos / schema / Tutorial / Macros / FindPlace < prev   
Encoding:
Text File  |  1994-06-01  |  678 b   |  20 lines

  1. macro findplace(sheet,block())
  2. local res,whole,instruction,newselection,rownum,errortype
  3. errortype=4
  4. if sheet<>"Tutorial" then
  5.   res=query("This button has no effect unless used from the spreadhseet \"Tutorial\".","Cancel","OK")
  6.   =res
  7. endif
  8. instruction=int(input("Go to Screen","Which Screen number?","","OK","Cancel"))
  9. if type(instruction)=errortype then ="Cancelled"
  10. if instruction<1 or instruction>18 then
  11.   res=query("Screens are numbered from 1 to 18","Cancel","OK")
  12.   =instruction
  13. endif
  14. rownum=13*(instruction-1)
  15. whole=wholesheet(sheet)
  16. res=changeselection(whole(rownum,0)..whole(rownum,0),3)
  17. rem res=changeselection(whole(rownum+1,0)..whole(rownum+1,0),1)
  18. =res
  19. endmacro
  20.