Open Office Basic

Joined
Oct 20, 2017
Messages
2
Reaction score
0
Points
1
I'm new to this on a MAC and am having trouble getting started. In Visual Basic on my PC I would code the following to put "OK" (without the quotes) in Cell A1 of the first worksheet.

Sub test1()
Dim ws1 as Worksheet
Dim rng1 as Range
set ws1 = Worksheets(1)
set rng1 = ws1.Range("A1")
rng1(1).Value = "OK"
End Sub

In Open Office Basic on my MAC I tried

Sub Main
dim ws1 as Object
dim rng1 as Object
set ws1 = Worksheets(1)
Set rng = ws1.Range("A1")
rng1(1).value = "OK"
End Sub

and got an error message at the Set ws1 line "Sub-procedure or function procedure not defined".

What am I missing?
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top