Ask Your Question

what is the equivalent in libreoffice calc to custom view in excel [closed]

asked 2014-07-17 23:06:30 +0100

robert.steven.566 gravatar image

updated 2015-08-31 18:11:40 +0100

Alex Kemp gravatar image

I want add buttons on a spreadsheet to show pre-defined areas of the spreadsheet on the screen I run linux mint and windows7 on a dual boot system. The spreadsheets were compiled in microsoft office97. I can get some of the microsoft VBA converted to run in LibreOffice calc but am having trouble with:
"Private Sub CommandButton1_Click()
End Sub"
as I can't figure out the LibreOffice equivalent to CustomViews

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-03-01 13:09:12.930219


Please edit your question to indicate: O/S, LO version, and a link / screenshot that clearly illustrates the Excel feature. Thanks.

oweng gravatar imageoweng ( 2014-07-18 03:52:38 +0100 )edit

1 Answer

Sort by » oldest newest most voted

answered 2014-07-23 16:21:57 +0100

robert.steven.566 gravatar image

updated 2014-07-25 07:32:01 +0100

oweng gravatar image

The only thing I can find to do is to open - record a macro, select a cell half way down the area you want, stop recording and save the macro which looks like this:

sub cars
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("")
rem ----------------------------------------------------------------------
rem dispatcher.executeDispatch(document, ".uno:DefineDBName", "", 0, Array())
rem ----------------------------------------------------------------------
dim args2(0) as new
args2(0).Name = "DbName"
args2(0).Value = "cars"
dispatcher.executeDispatch(document, ".uno:SelectDB", "", 0, args2())
rem ----------------------------------------------------------------------
dim args3(0) as new
args3(0).Name = "ToPoint"
args3(0).Value = "$T$8"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args3())
end sub

Assign the macro to a button which when clicked will take you to the correct row but not the columns. You then need to scroll across the columns to find the area you are looking for. Not as simple as Xcel but at least though, half the work is done for you.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-07-17 23:06:30 +0100

Seen: 614 times

Last updated: Jul 25 '14