home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / pcmagazi / 1992 / 20 / prnrng.xlm (.txt) < prev    next >
Excel Spreadsheet  |  1992-10-21  |  8KB  |  110 lines

  1. Sheet: 
  2. (0, 0)        Auto_Open
  3. (0, 1)        Executed on sheet open
  4. (1, 0)        11
  5. (1, 1)        Add command to "File" when opened
  6. (2, 0)        TRUE
  7. (2, 1)        Stop macro
  8. (3, 1)        
  9. (4, 0)        Auto_Close
  10. (4, 1)        Executed on sheet close
  11. (5, 0)        TRUE
  12. (5, 1)        Remove command from "File" when closed
  13. (6, 0)        TRUE
  14. (6, 1)        Stop macro
  15. (7, 0)        TRUE
  16. (7, 1)        
  17. (8, 1)        Executed on menu click
  18. (9, 0)        PrintStart
  19. (9, 1)        get user input
  20. (10, 0)        TRUE
  21. (10, 1)        if user cancelled
  22. (11, 0)        TRUE
  23. (11, 1)          then stop macro
  24. (12, 0)        TRUE
  25. (12, 1)        
  26. (13, 0)        FALSE
  27. (13, 1)        
  28. (14, 0)        TRUE
  29. (14, 1)        As long as PageStr is not empty,
  30. (15, 0)        TRUE
  31. (15, 1)          If there's no comma in PageStr,
  32. (16, 0)        TRUE
  33. (16, 1)            Assign PageStr to TempStr.
  34. (17, 0)        TRUE
  35. (17, 1)          Otherwise,
  36. (18, 0)        TRUE
  37. (18, 1)            Assign to TempStr everything in PageStr up to character before first comma.
  38. (19, 0)        TRUE
  39. (19, 1)        
  40. (20, 0)        TRUE
  41. (20, 1)        Defer error checking to ERROR(TRUE...) in line 29
  42. (21, 0)        #VALUE!
  43. (21, 1)          If TempStr includes a hyphen,
  44. (22, 0)        TRUE
  45. (22, 1)            Assign to PageFrom everything in TempStr up to character before hyphen.
  46. (23, 0)        TRUE
  47. (23, 1)            And assign to PageTo everything in TempStr following the hyphen.
  48. (24, 0)        #VALUE!
  49. (24, 1)          Otherwise,
  50. (25, 0)        TRUE
  51. (25, 1)            Assign TempStr to PageFrom.
  52. (26, 0)        TRUE
  53. (26, 1)            And also assign TempStr to PageTo.
  54. (27, 0)        #VALUE!
  55. (27, 1)        
  56. (28, 0)        TRUE
  57. (28, 1)        Direct error handling to PrintError.
  58. (29, 0)        FALSE
  59. (29, 1)          Print from PageFrom to PageTo.
  60. (30, 0)        TRUE
  61. (30, 1)          If PageStr is now comma-less,
  62. (31, 0)        TRUE
  63. (31, 1)            Assign a null string to PageStr.
  64. (32, 0)        TRUE
  65. (32, 1)          Otherwise,
  66. (33, 0)        TRUE
  67. (33, 1)            Remove from PageStr everything up to (and including) the first comma.
  68. (34, 0)        TRUE
  69. (34, 1)        
  70. (35, 0)        TRUE
  71. (35, 1)        Repeat the loop until PageStr is empty.
  72. (36, 0)        TRUE
  73. (36, 1)        Quit
  74. (37, 1)        
  75. (38, 0)        PrintError
  76. (38, 1)        Executed on printing error
  77. (39, 0)        TRUE
  78. (39, 1)        tell user about error
  79. (40, 0)        TRUE
  80. (40, 1)        give user another chance
  81. (41, 0)        #N/A!
  82. (41, 1)        Stop macro
  83. (42, 0)        TRUE
  84. (42, 1)        
  85. (44, 1)        
  86. (45, 0)        Sheet Name
  87. (45, 1)        Value
  88. (46, 0)        
  89. (46, 1)        
  90. (47, 0)        PrintFrom
  91. (47, 1)        2
  92. (48, 0)        
  93. (48, 1)        
  94. (49, 0)        PrintTo
  95. (49, 1)        2
  96. (50, 0)        
  97. (50, 1)        
  98. (51, 0)        TempStr
  99. (51, 1)        2
  100. (52, 0)        
  101. (52, 1)        
  102. (53, 0)        PageStr
  103. (53, 1)        
  104. (54, 0)        
  105. (54, 1)        
  106. (55, 0)        PrintMenu
  107. (55, 1)        
  108. (56, 0)        Print &Range     Ctrl+Shift+R
  109. (56, 1)        PrintStar
  110.