Salve a tutta la mail list, mi sono deciso a cambiare
operatore, uso quello del mio sito.
Ringrazio tutti per i consigli che mi avete dato in merito
alla web-mail.
Il problema che adesso voglio sottoporvi è la trduzione di
questa macro che ho trovato on-line e che esegue un
simulazione della matrice di "Matrix il film" in excel,
eccola:
Public Sub CodicePerVoi()
Dim z As Integer
Dim i(41) As Integer
Dim k As Integer
Dim j As Integer
Dim y As Integer
Cells.Select
With Selection.Interior
..ColorIndex = 1
..Pattern = xlSolid
End With
Selection.Font.ColorIndex = 4
Selection.Font.Bold = True
With Selection
..HorizontalAlignment = xlCenter
..VerticalAlignment = xlBottom
..WrapText = False
..Orientation = 0
..AddIndent = False
..ShrinkToFit = False
..MergeCells = False
End With
Columns("A:AZ").ColumnWidth = 2.71
For z = 1 To 32000
y = Int(Rnd() * 40 + 1)
k = Int(Rnd() * 255 + 1)
ActiveSheet.Cells(i(y) + 1, y).Select
Selection.Value = Chr(k)
i(y) = i(y) + 1
Next z
End Sub
Siccome volevo portarla anche per calc e poi metterla a
disposizione ho incominciato la traduzione in SB, ma
incontro alcuni problemi con le opzioni supportate dai vari
oggetti di VBA, ecco il primo pezzo e come ho cercato di
tradurlo:
Sub Matix
Dim oDoc as Object
Dim oSheet As Object
Dim oCell As Object
Dim oCol As Object
Dim z As Integer
Dim i(41) As Integer
Dim k As Integer
Dim j As Integer
Dim y As Integer
oDoc = StartDesktop.CurrentComponent
oSheet = oDoc.Sheets(0)
Cells.Select ==> oCell =
ThisComponent.getCurrentSelection
With.Selection.Interior ==> oCell.BackCellColor =
RGB(0, 0, 0)
.Color.Index = 1
.Pattern = xlSolid ==> come si traduce in OOo.Calc
End With
Selection.Font.ColorIndex = 4 ==> oCell.CharColor =
RGB(0, 255, 0)
Selection.Font.Bold = True ==> oCell.? il Bold non
sono riuscito a trovare nessuna proprietà in SB
With Selection ==> Tutta questa parte non riesco a
tradurla che oggetto devo usare?
..HorizontalAlignment = xlCenter
..VerticalAlignment = xlBottom
..WrapText = False
..Orientation = 0
..AddIndent = False
..ShrinkToFit = False
..MergeCells = False
End With
Columns("A:AZ").ColumnWidth = 2.71 ==> oRow =
oSheet.Columns.getByName("A:AZ").Width = 2.71 (?)
Per il momento ho finito qui e sto cercando di risolvere
quelle cose che non capisco tipo "With Selection" e le varie
proprietà.
Ciao Massimo
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]