home *** CD-ROM | disk | FTP | other *** search
/ PCNET 2006 September - Disc 1 / PCNET_CD_2006_09.iso / linux / puppy-barebones-2.01r2.iso / pup_201.sfs / usr / share / spreadsheets / example.abs next >
Encoding:
abs spreadsheet  |  2001-11-11  |  10.4 KB  |  294 lines

  1. '===================ABV PROJECT======================
  2. '===================MODULE 1  =======================
  3. Sub main ()
  4. 'you can edit this macro to execute any command when loading this workbook
  5. 'next line call the routine that fill the sheet
  6. call absmain ()
  7. End Sub
  8.  
  9.  
  10. 'Function not used if run inside abs (replaced by a builtin function)
  11.  
  12. Sub absnc(row,col,formula)
  13. Cells(row,col).Formula=formula
  14. End sub
  15.  
  16. Sub absmain()
  17. 'Do not edit this macro, changes will not be saved with the workbook!!!
  18. Dim objchart  As Object
  19. Dim objbutton As Object
  20. Worksheets(1).Name = "TEST"
  21. Worksheets(2).Name = "B"
  22. Worksheets(3).Name = "C"
  23. Worksheets(1).Activate
  24. Columns("A").ColumnWidth = 1.857143
  25. Columns("B").ColumnWidth = 25.285714
  26. Columns("D").ColumnWidth = 5.714286
  27. Columns("E").ColumnWidth = 5.714286
  28. Columns("F").ColumnWidth = 5.714286
  29. Columns("G").ColumnWidth = 5.714286
  30. Columns("H").ColumnWidth = 5.714286
  31. Columns("I").ColumnWidth = 5.714286
  32. Columns("J").ColumnWidth = 6.857143
  33. Columns("K").ColumnWidth = 5.714286
  34. Columns("L").ColumnWidth = 5.714286
  35. Columns("M").ColumnWidth = 5.714286
  36. Columns("N").ColumnWidth = 6.857143
  37. Columns("O").ColumnWidth = 6.857143
  38. Columns("P").ColumnWidth = 5.714286
  39. Rows("2").RowHeight = 46
  40. Rows("3").RowHeight = 29
  41. absnc(2,2,"'Welcome !")
  42. Cells(2,2).Font.Name = "Times"
  43. Cells(2,2).Font.Size = 24
  44. Cells(2,2).Font.Bold = True 
  45. Cells(2,2).HorizontalAlignment = xlCenter
  46. Cells(2,2).Font.ColorIndex = 14
  47. Cells(3,2).Font.Name = "Times"
  48. Cells(3,2).Font.Size = 24
  49. Cells(3,2).Font.Bold = True 
  50. Cells(3,2).HorizontalAlignment = xlCenter
  51. absnc(5,2,"'Function:")
  52. Cells(5,2).Font.Name = "Courier"
  53. Cells(5,2).Font.Size = 14
  54. Cells(5,2).Font.Bold = True 
  55. Cells(5,2).Font.Italic = True 
  56. Cells(5,2).Font.ColorIndex = 20
  57. absnc(5,3,"'x =")
  58. Cells(5,3).Borders(xlEdgeTop).LineStyle = xlLineStyleContinuous
  59. Cells(5,3).Borders(xlEdgeLeft).LineStyle = xlLineStyleContinuous
  60. Cells(5,3).Font.Bold = True 
  61. Cells(5,3).Interior.ColorIndex = 27
  62. Cells(5,3).Font.ColorIndex = 9
  63. absnc(5,4,"0")
  64. Cells(5,4).Borders(xlEdgeTop).LineStyle = xlLineStyleContinuous
  65. Cells(5,4).Interior.ColorIndex = 27
  66. Cells(5,4).Font.ColorIndex = 17
  67. Cells(5,4).NumberFormat = "0.00"
  68. absnc(5,5,"=+3.14/6+D5")
  69. Cells(5,5).Borders(xlEdgeTop).LineStyle = xlLineStyleContinuous
  70. Cells(5,5).Interior.ColorIndex = 27
  71. Cells(5,5).Font.ColorIndex = 17
  72. Cells(5,5).NumberFormat = "0.00"
  73. absnc(5,6,"=+3.14/6+E5")
  74. Cells(5,6).Borders(xlEdgeTop).LineStyle = xlLineStyleContinuous
  75. Cells(5,6).Interior.ColorIndex = 27
  76. Cells(5,6).Font.ColorIndex = 17
  77. Cells(5,6).NumberFormat = "0.00"
  78. absnc(5,7,"=+3.14/6+F5")
  79. Cells(5,7).Borders(xlEdgeTop).LineStyle = xlLineStyleContinuous
  80. Cells(5,7).Interior.ColorIndex = 27
  81. Cells(5,7).Font.ColorIndex = 17
  82. Cells(5,7).NumberFormat = "0.00"
  83. absnc(5,8,"=+3.14/6+G5")
  84. Cells(5,8).Borders(xlEdgeTop).LineStyle = xlLineStyleContinuous
  85. Cells(5,8).Interior.ColorIndex = 27
  86. Cells(5,8).Font.ColorIndex = 17
  87. Cells(5,8).NumberFormat = "0.00"
  88. absnc(5,9,"=+3.14/6+H5")
  89. Cells(5,9).Borders(xlEdgeTop).LineStyle = xlLineStyleContinuous
  90. Cells(5,9).Interior.ColorIndex = 27
  91. Cells(5,9).Font.ColorIndex = 17
  92. Cells(5,9).NumberFormat = "0.00"
  93. absnc(5,10,"=+3.14/6+I5")
  94. Cells(5,10).Borders(xlEdgeTop).LineStyle = xlLineStyleContinuous
  95. Cells(5,10).Interior.ColorIndex = 27
  96. Cells(5,10).Font.ColorIndex = 17
  97. Cells(5,10).NumberFormat = "0.00"
  98. absnc(5,11,"=+3.14/6+J5")
  99. Cells(5,11).Borders(xlEdgeTop).LineStyle = xlLineStyleContinuous
  100. Cells(5,11).Interior.ColorIndex = 27
  101. Cells(5,11).Font.ColorIndex = 17
  102. Cells(5,11).NumberFormat = "0.00"
  103. absnc(5,12,"=+3.14/6+K5")
  104. Cells(5,12).Borders(xlEdgeTop).LineStyle = xlLineStyleContinuous
  105. Cells(5,12).Interior.ColorIndex = 27
  106. Cells(5,12).Font.ColorIndex = 17
  107. Cells(5,12).NumberFormat = "0.00"
  108. absnc(5,13,"=+3.14/6+L5")
  109. Cells(5,13).Borders(xlEdgeTop).LineStyle = xlLineStyleContinuous
  110. Cells(5,13).Interior.ColorIndex = 27
  111. Cells(5,13).Font.ColorIndex = 17
  112. Cells(5,13).NumberFormat = "0.00"
  113. absnc(5,14,"=+3.14/6+M5")
  114. Cells(5,14).Borders(xlEdgeTop).LineStyle = xlLineStyleContinuous
  115. Cells(5,14).Interior.ColorIndex = 27
  116. Cells(5,14).Font.ColorIndex = 17
  117. Cells(5,14).NumberFormat = "0.00"
  118. absnc(5,15,"=+3.14/6+N5")
  119. Cells(5,15).Borders(xlEdgeTop).LineStyle = xlLineStyleContinuous
  120. Cells(5,15).Interior.ColorIndex = 27
  121. Cells(5,15).Font.ColorIndex = 17
  122. Cells(5,15).NumberFormat = "0.00"
  123. absnc(5,16,"=+3.14/6+O5")
  124. Cells(5,16).Borders(xlEdgeTop).LineStyle = xlLineStyleContinuous
  125. Cells(5,16).Borders(xlEdgeRight).LineStyle = xlLineStyleContinuous
  126. Cells(5,16).Interior.ColorIndex = 27
  127. Cells(5,16).Font.ColorIndex = 17
  128. Cells(5,16).NumberFormat = "0.00"
  129. absnc(6,3,"'sin(x) =")
  130. Cells(6,3).Borders(xlEdgeLeft).LineStyle = xlLineStyleContinuous
  131. Cells(6,3).Font.Bold = True 
  132. Cells(6,3).Interior.ColorIndex = 27
  133. Cells(6,3).Font.ColorIndex = 9
  134. absnc(6,4,"=+sin(D$5)")
  135. Cells(6,4).Interior.ColorIndex = 27
  136. Cells(6,4).Font.ColorIndex = 17
  137. Cells(6,4).NumberFormat = "0.00"
  138. absnc(6,5,"=+sin(E$5)")
  139. Cells(6,5).Interior.ColorIndex = 27
  140. Cells(6,5).Font.ColorIndex = 17
  141. Cells(6,5).NumberFormat = "0.00"
  142. absnc(6,6,"=+sin(F$5)")
  143. Cells(6,6).Interior.ColorIndex = 27
  144. Cells(6,6).Font.ColorIndex = 17
  145. Cells(6,6).NumberFormat = "0.00"
  146. absnc(6,7,"=+sin(G$5)")
  147. Cells(6,7).Interior.ColorIndex = 27
  148. Cells(6,7).Font.ColorIndex = 17
  149. Cells(6,7).NumberFormat = "0.00"
  150. absnc(6,8,"=+sin(H$5)")
  151. Cells(6,8).Interior.ColorIndex = 27
  152. Cells(6,8).Font.ColorIndex = 17
  153. Cells(6,8).NumberFormat = "0.00"
  154. absnc(6,9,"=+sin(I$5)")
  155. Cells(6,9).Interior.ColorIndex = 27
  156. Cells(6,9).Font.ColorIndex = 17
  157. Cells(6,9).NumberFormat = "0.00"
  158. absnc(6,10,"=+sin(J$5)")
  159. Cells(6,10).Interior.ColorIndex = 27
  160. Cells(6,10).Font.ColorIndex = 17
  161. Cells(6,10).NumberFormat = "0.00"
  162. absnc(6,11,"=+sin(K$5)")
  163. Cells(6,11).Interior.ColorIndex = 27
  164. Cells(6,11).Font.ColorIndex = 17
  165. Cells(6,11).NumberFormat = "0.00"
  166. absnc(6,12,"=+sin(L$5)")
  167. Cells(6,12).Interior.ColorIndex = 27
  168. Cells(6,12).Font.ColorIndex = 17
  169. Cells(6,12).NumberFormat = "0.00"
  170. absnc(6,13,"=+sin(M$5)")
  171. Cells(6,13).Interior.ColorIndex = 27
  172. Cells(6,13).Font.ColorIndex = 17
  173. Cells(6,13).NumberFormat = "0.00"
  174. absnc(6,14,"=+sin(N$5)")
  175. Cells(6,14).Interior.ColorIndex = 27
  176. Cells(6,14).Font.ColorIndex = 17
  177. Cells(6,14).NumberFormat = "0.00"
  178. absnc(6,15,"=+sin(O$5)")
  179. Cells(6,15).Interior.ColorIndex = 27
  180. Cells(6,15).Font.ColorIndex = 17
  181. Cells(6,15).NumberFormat = "0.00"
  182. absnc(6,16,"=+sin(P$5)")
  183. Cells(6,16).Borders(xlEdgeRight).LineStyle = xlLineStyleContinuous
  184. Cells(6,16).Interior.ColorIndex = 27
  185. Cells(6,16).Font.ColorIndex = 17
  186. Cells(6,16).NumberFormat = "0.00"
  187. absnc(7,3,"'cos(x) =")
  188. Cells(7,3).Borders(xlEdgeBottom).LineStyle = xlLineStyleContinuous
  189. Cells(7,3).Borders(xlEdgeLeft).LineStyle = xlLineStyleContinuous
  190. Cells(7,3).Font.Bold = True 
  191. Cells(7,3).Interior.ColorIndex = 27
  192. Cells(7,3).Font.ColorIndex = 9
  193. absnc(7,4,"=+cos(D$5)")
  194. Cells(7,4).Borders(xlEdgeBottom).LineStyle = xlLineStyleContinuous
  195. Cells(7,4).Interior.ColorIndex = 27
  196. Cells(7,4).Font.ColorIndex = 17
  197. Cells(7,4).NumberFormat = "0.00"
  198. absnc(7,5,"=+cos(E$5)")
  199. Cells(7,5).Borders(xlEdgeBottom).LineStyle = xlLineStyleContinuous
  200. Cells(7,5).Interior.ColorIndex = 27
  201. Cells(7,5).Font.ColorIndex = 17
  202. Cells(7,5).NumberFormat = "0.00"
  203. absnc(7,6,"=+cos(F$5)")
  204. Cells(7,6).Borders(xlEdgeBottom).LineStyle = xlLineStyleContinuous
  205. Cells(7,6).Interior.ColorIndex = 27
  206. Cells(7,6).Font.ColorIndex = 17
  207. Cells(7,6).NumberFormat = "0.00"
  208. absnc(7,7,"=+cos(G$5)")
  209. Cells(7,7).Borders(xlEdgeBottom).LineStyle = xlLineStyleContinuous
  210. Cells(7,7).Interior.ColorIndex = 27
  211. Cells(7,7).Font.ColorIndex = 17
  212. Cells(7,7).NumberFormat = "0.00"
  213. absnc(7,8,"=+cos(H$5)")
  214. Cells(7,8).Borders(xlEdgeBottom).LineStyle = xlLineStyleContinuous
  215. Cells(7,8).Interior.ColorIndex = 27
  216. Cells(7,8).Font.ColorIndex = 17
  217. Cells(7,8).NumberFormat = "0.00"
  218. absnc(7,9,"=+cos(I$5)")
  219. Cells(7,9).Borders(xlEdgeBottom).LineStyle = xlLineStyleContinuous
  220. Cells(7,9).Interior.ColorIndex = 27
  221. Cells(7,9).Font.ColorIndex = 17
  222. Cells(7,9).NumberFormat = "0.00"
  223. absnc(7,10,"=+cos(J$5)")
  224. Cells(7,10).Borders(xlEdgeBottom).LineStyle = xlLineStyleContinuous
  225. Cells(7,10).Interior.ColorIndex = 27
  226. Cells(7,10).Font.ColorIndex = 17
  227. Cells(7,10).NumberFormat = "0.00"
  228. absnc(7,11,"=+cos(K$5)")
  229. Cells(7,11).Borders(xlEdgeBottom).LineStyle = xlLineStyleContinuous
  230. Cells(7,11).Interior.ColorIndex = 27
  231. Cells(7,11).Font.ColorIndex = 17
  232. Cells(7,11).NumberFormat = "0.00"
  233. absnc(7,12,"=+cos(L$5)")
  234. Cells(7,12).Borders(xlEdgeBottom).LineStyle = xlLineStyleContinuous
  235. Cells(7,12).Interior.ColorIndex = 27
  236. Cells(7,12).Font.ColorIndex = 17
  237. Cells(7,12).NumberFormat = "0.00"
  238. absnc(7,13,"=+cos(M$5)")
  239. Cells(7,13).Borders(xlEdgeBottom).LineStyle = xlLineStyleContinuous
  240. Cells(7,13).Interior.ColorIndex = 27
  241. Cells(7,13).Font.ColorIndex = 17
  242. Cells(7,13).NumberFormat = "0.00"
  243. absnc(7,14,"=+cos(N$5)")
  244. Cells(7,14).Borders(xlEdgeBottom).LineStyle = xlLineStyleContinuous
  245. Cells(7,14).Interior.ColorIndex = 27
  246. Cells(7,14).Font.ColorIndex = 17
  247. Cells(7,14).NumberFormat = "0.00"
  248. absnc(7,15,"=+cos(O$5)")
  249. Cells(7,15).Borders(xlEdgeBottom).LineStyle = xlLineStyleContinuous
  250. Cells(7,15).Interior.ColorIndex = 27
  251. Cells(7,15).Font.ColorIndex = 17
  252. Cells(7,15).NumberFormat = "0.00"
  253. absnc(7,16,"=+cos(P$5)")
  254. Cells(7,16).Borders(xlEdgeBottom).LineStyle = xlLineStyleContinuous
  255. Cells(7,16).Borders(xlEdgeRight).LineStyle = xlLineStyleContinuous
  256. Cells(7,16).Interior.ColorIndex = 27
  257. Cells(7,16).Font.ColorIndex = 17
  258. Cells(7,16).NumberFormat = "0.00"
  259. absnc(10,2,"'chart examples:")
  260. Cells(10,2).Font.Name = "Courier"
  261. Cells(10,2).Font.Size = 14
  262. Cells(10,2).Font.Bold = True 
  263. Cells(10,2).Font.Italic = True 
  264. Cells(10,2).Font.ColorIndex = 20
  265. Cells(13,2).Font.Name = "Courier"
  266. Cells(13,2).Font.Size = 14
  267. Cells(13,2).Font.Bold = True 
  268. Cells(13,2).Font.Italic = True 
  269. Cells(13,2).Font.ColorIndex = 20
  270. Set objchart = Worksheets("TEST").ChartObjects.Add(211,200,522,263)
  271. objchart.Activate
  272. ActiveChart.ChartType = xlLine
  273. ActiveChart.SeriesCollection.NewSeries
  274. ActiveChart.SeriesCollection(1).XValues = Range("D5:P5")
  275. ActiveChart.SeriesCollection(1).Name = "'sin (x)"
  276. ActiveChart.SeriesCollection(1).Values = Range("D6:P6")
  277. ActiveChart.SeriesCollection.NewSeries
  278. ActiveChart.SeriesCollection(2).Name = "'cos (x)"
  279. ActiveChart.SeriesCollection(2).Values = Range("D7:P7")
  280. ActiveChart.HasTitle = True
  281. ActiveChart.ChartTitle.Text = "'title"
  282. ActiveChart.Axes(xlCategory).HasTitle = True
  283. ActiveChart.Axes(xlCategory).AxisTitle.Text = "'X axis"
  284. ActiveChart.Axes(xlValue).HasMajorGridlines = True
  285. ActiveChart.Axes(xlValue   ).HasTitle = True
  286. ActiveChart.Axes(xlValue   ).AxisTitle.Text = "'Y axis"
  287. ActiveChart.Axes(xlCategory   ).MaximumScale = 6.140000
  288. ActiveChart.Axes(xlCategory   ).MajorUnit = 1.570000
  289. ActiveSheet.Shapes.AddShape(msoShapeOval,20, 15,169,72).Select
  290. Worksheets(2).Activate
  291. Worksheets(3).Activate
  292. Worksheets(1).Activate
  293. End Sub
  294.