[Solved] Reduce the default 100% view in Calc sheet

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
arunppai
Posts: 8
Joined: Sun Jan 23, 2022 2:25 pm

[Solved] Reduce the default 100% view in Calc sheet

Post by arunppai »

Hello Friends

I am using Windows 8.1 and OpenOffice 4.1.15.

Please tell me the VB Macro Code to reduce the 100% View in a Calc Spreadsheet.

Say I want to reduce it to 85%.

(On the application it is available in the View Tab, Zoom, Variable with arrows to increase and decrease or at the bottom right of the screen.)

I searched the forum and also Andrew Pitonyak's latest book OOME_4_1.pdf but could'nt find any VB code for this.

Thanks and Regards.
Last edited by Hagar Delest on Fri Sep 06, 2024 11:15 am, edited 1 time in total.
Reason: tagged solved.
OpenOffice 4.1.7
Windows 8.1
FJCC
Moderator
Posts: 9394
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: VB Macro Code to reduce the default 100% View in Calc Sheet.

Post by FJCC »

This is OpenOffice Basic, not VB. Do you really want to do this with VB?

Code: Select all

Sub Zoom85
ThisComponent.CurrentController.ZoomValue = 85
End Sub
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
arunppai
Posts: 8
Joined: Sun Jan 23, 2022 2:25 pm

Re: VB Macro Code to reduce the default 100% view in Calc sheet

Post by arunppai »

Hello Friend,

Thank so much for your reply on "VB Macro Code to reduce the default 100% view in Calc sheet"

I will check it out and come back.

Regards.
OpenOffice 4.1.7
Windows 8.1
arunppai
Posts: 8
Joined: Sun Jan 23, 2022 2:25 pm

Re: VB Macro Code to reduce the default 100% view in Calc sheet

Post by arunppai »

Yes it worked so simple yet I could'nt figure it out eventhough I used XRAY & MRI.
I am still a beginner!

Is it a property or method of the Doc or the Sheet?

"This is OpenOffice Basic, not VB. Do you really want to do this with VB?"
Yes OpenOfficeBasic is what I wanted. Sorry I used the wrong terminology.

I thought I was almost there when I got to page 283 / 679 of OOME_4_1.pdf Listing 259 by Andrew Pitonyak but that was different it shrunk the entire window.

Once again thank a ton, have a nice day.
OpenOffice 4.1.7
Windows 8.1
FJCC
Moderator
Posts: 9394
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: VB Macro Code to reduce the default 100% view in Calc sheet

Post by FJCC »

In Basic, ThisComponent refers to the component (document) that called the macro. The CurrentController is a property of that document. It has properties related to how you see the document, like FirstVisibleColumn, ShowGrid, and ZoomValue.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Post Reply