Loops OpenOffice计算(宏)
我正在尝试在OpenOffice Calc(宏)中进行循环 到目前为止,我已经尝试过:Loops OpenOffice计算(宏),loops,openoffice-calc,Loops,Openoffice Calc,我正在尝试在OpenOffice Calc(宏)中进行循环 到目前为止,我已经尝试过: Sub Main For x = 1 To 10 If Cells(x,1) = 50 Then Cells(x,1).Value = 20 End If End For End Sub 有人知道它是如何工作的吗?OpenOffice Basic(StarBasic)不是VBA。如果您的代码应该在ActiveSheet中从A1运行到
Sub Main
For x = 1 To 10
If Cells(x,1) = 50 Then
Cells(x,1).Value = 20
End If
End For
End Sub
有人知道它是如何工作的吗?OpenOffice Basic(StarBasic)不是VBA。如果您的代码应该在ActiveSheet中从A1运行到A10,那么在OO Basic中应该是:
Sub Main
with ThisComponent.CurrentController.ActiveSheet
for lRow = 0 to 9
if .getCellByPosition(0, lRow).value = 50 then
.getCellByPosition(0, lRow).value = 20
endif
next
end with
End Sub
初学者的一些链接:
尤其推荐使用X射线工具
你的具体问题有:
问候
Axel迭代10个单元格,如果其值为50,则将该值更改为20。你能补充一下这方面的细节吗?你想知道什么?我得到一个错误(语法错误)