UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Open Office (apache) Spreadsheets    
 
   
zocker
post Dec 30 2017, 05:37 PM
Post#1


Utterly Eccentric and Moderator
Posts: 4,062
Joined: 4-March 00
From: Bristol / Ipswich / Spain


Has anyone here any experience of the above BASIC that allows UDFs & etc to be created? Its very very clunky but my son has been set (from Uni) a task of creating a navigation program..its compulsory as well as stupid. If anyone has any knowledge I will post a couple of simple questions...like how do you open the BASIC editor without running through 8 menu choices.

Thanks!

Seasons greetings to all

Zocker

--------------------
I would like to remind members and visitors that UtterAccess is a NON SMOKING website. In that respect, it is the worlds first Thank you for not smoking.
Go to the top of the page
 
cheekybuddha
post Dec 31 2017, 11:39 AM
Post#2


UtterAccess VIP
Posts: 9,759
Joined: 6-December 03
From: Telegraph Hill


Try here:
LibreOffice Basic Programmer's Guide - Ask LibreOffice
or here:
Getting Started with Macros - The Document Foundation Wiki

hth,

d

--------------------


Regards,

David Marten
Go to the top of the page
 
zocker
post Jan 1 2018, 05:25 PM
Post#3


Utterly Eccentric and Moderator
Posts: 4,062
Joined: 4-March 00
From: Bristol / Ipswich / Spain


Thanks for your reply! I looked at some of the documentation and considered the project which my son had to undertake - which was

Build a spreadsheet which would allow a user to enter two geographic locations in Degrees, Minutes and Seconds , find the distance between them and the course to be steered. ( He has no previous programming expertise)

After some 6 hours work I told him to forget it, fortunately he does after all have a choice of projects. OpenOffice calc spreadsheet is a clone of Excel but with 75% of the VB editor missing.


Thanks again!


Z

--------------------
I would like to remind members and visitors that UtterAccess is a NON SMOKING website. In that respect, it is the worlds first Thank you for not smoking.
Go to the top of the page
 
cheekybuddha
post Jan 2 2018, 04:27 AM
Post#4


UtterAccess VIP
Posts: 9,759
Joined: 6-December 03
From: Telegraph Hill


Morning Z,

Actually, what you describe might be easier than it sounds.

Open/LibreOffice Calc is complicated to program when interacting with the interface.

However, if your son has the logic for calculating the distance he can probably just write a function (or two) that accepts the appropriate inputs, and then call it as part of a formula in a cell on the sheet.

You could help him write a function (pretty much as normal in VBA), eg:
CODE
Function GetDistance(FromDegrees As Integer, FromMinutes As Integer, FromSeconds As Integer, _
                     ToDegrees As Integer, ToMinutes As Integer, ToSeconds As Integer) As Double

  Dim dRet As Double

REM  Do the trig here

  GetDistance = dRet

End Function


And another one for the course.

Then, in your sheet, you can put the Degrees, Minutes and Seconds in cells A1:A3 and B1:B3,

and in another cell have the formula:
=GetDistance(A1, A2, A3, B1, B2, B3)

and in another have:
=GetCourse(A1, A2, A3, B1, B2, B3)

You won't have to muck about with the UNO layer at all I don't think.

hth,

d

--------------------


Regards,

David Marten
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    23rd May 2018 - 09:32 AM