Advertisement
justyb11

Simple Example 03

Sep 4th, 2017
3,111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. REM  *****  BASIC  *****
  2.  
  3. Sub Main
  4.  
  5.     Dim oWrkBk    as Object
  6.     Dim oRng      as Object
  7.     Dim dArray(2,2)
  8.    
  9.     oWrkBk   = ThisComponent
  10.    
  11.     dArray(0, 0)   =   "Square 1"
  12.     dArray(0, 1)   =   "Square 2"
  13.     dArray(0, 2)   =   "Square 3"
  14.    
  15.     dArray(1, 0)   =   "Square 11"
  16.     dArray(1, 1)   =   "Square 12"
  17.     dArray(1, 2)   =   "Square 13" 
  18.    
  19.     dArray(2, 0)   =   "Square 21"
  20.     dArray(2, 1)   =   "Square 22"
  21.     dArray(2, 2)   =   "Square 23"
  22.    
  23.        
  24.     oRng = oWrkBk.Sheets(0).getCellRangeByName("C2:E4")
  25.    
  26.     oRng.setDataArray(dArray)
  27.  
  28. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement