home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
pcmagazi
/
1992
/
20
/
prnrng.xlm
(
.txt
)
< prev
next >
Wrap
Excel Spreadsheet
|
1992-10-21
|
8KB
|
110 lines
Sheet:
(0, 0) Auto_Open
(0, 1) Executed on sheet open
(1, 0) 11
(1, 1) Add command to "File" when opened
(2, 0) TRUE
(2, 1) Stop macro
(3, 1)
(4, 0) Auto_Close
(4, 1) Executed on sheet close
(5, 0) TRUE
(5, 1) Remove command from "File" when closed
(6, 0) TRUE
(6, 1) Stop macro
(7, 0) TRUE
(7, 1)
(8, 1) Executed on menu click
(9, 0) PrintStart
(9, 1) get user input
(10, 0) TRUE
(10, 1) if user cancelled
(11, 0) TRUE
(11, 1) then stop macro
(12, 0) TRUE
(12, 1)
(13, 0) FALSE
(13, 1)
(14, 0) TRUE
(14, 1) As long as PageStr is not empty,
(15, 0) TRUE
(15, 1) If there's no comma in PageStr,
(16, 0) TRUE
(16, 1) Assign PageStr to TempStr.
(17, 0) TRUE
(17, 1) Otherwise,
(18, 0) TRUE
(18, 1) Assign to TempStr everything in PageStr up to character before first comma.
(19, 0) TRUE
(19, 1)
(20, 0) TRUE
(20, 1) Defer error checking to ERROR(TRUE...) in line 29
(21, 0) #VALUE!
(21, 1) If TempStr includes a hyphen,
(22, 0) TRUE
(22, 1) Assign to PageFrom everything in TempStr up to character before hyphen.
(23, 0) TRUE
(23, 1) And assign to PageTo everything in TempStr following the hyphen.
(24, 0) #VALUE!
(24, 1) Otherwise,
(25, 0) TRUE
(25, 1) Assign TempStr to PageFrom.
(26, 0) TRUE
(26, 1) And also assign TempStr to PageTo.
(27, 0) #VALUE!
(27, 1)
(28, 0) TRUE
(28, 1) Direct error handling to PrintError.
(29, 0) FALSE
(29, 1) Print from PageFrom to PageTo.
(30, 0) TRUE
(30, 1) If PageStr is now comma-less,
(31, 0) TRUE
(31, 1) Assign a null string to PageStr.
(32, 0) TRUE
(32, 1) Otherwise,
(33, 0) TRUE
(33, 1) Remove from PageStr everything up to (and including) the first comma.
(34, 0) TRUE
(34, 1)
(35, 0) TRUE
(35, 1) Repeat the loop until PageStr is empty.
(36, 0) TRUE
(36, 1) Quit
(37, 1)
(38, 0) PrintError
(38, 1) Executed on printing error
(39, 0) TRUE
(39, 1) tell user about error
(40, 0) TRUE
(40, 1) give user another chance
(41, 0) #N/A!
(41, 1) Stop macro
(42, 0) TRUE
(42, 1)
(44, 1)
(45, 0) Sheet Name
(45, 1) Value
(46, 0)
(46, 1)
(47, 0) PrintFrom
(47, 1) 2
(48, 0)
(48, 1)
(49, 0) PrintTo
(49, 1) 2
(50, 0)
(50, 1)
(51, 0) TempStr
(51, 1) 2
(52, 0)
(52, 1)
(53, 0) PageStr
(53, 1)
(54, 0)
(54, 1)
(55, 0) PrintMenu
(55, 1)
(56, 0) Print &Range Ctrl+Shift+R
(56, 1)