[Solved] Immediate Window

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
Arun P. Pai
Posts: 15
Joined: Thu Apr 26, 2018 7:53 am

[Solved] Immediate Window

Post by Arun P. Pai »

Dear Friends,

I would like to know if there is an equivalent of an
Immediate Window
in OOo BASIC. [This Window is available in MS-Excel IDE]

If it is, how do I activate this Window?

There is a Watch Window in OOo for variable values but I would like to activate
Immediate Window
Thank You in advance,

Arun.
Last edited by Arun P. Pai on Thu Jul 05, 2018 5:34 am, edited 1 time in total.
Arun
OS - Windows 8.1
Open Office 4.1.5
User avatar
Zizi64
Volunteer
Posts: 11361
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Immediate Window

Post by Zizi64 »

What you want to achieve really? What is the "Immediate window"? What you want to do with it?

The AOO and LO are not MS Office clones. Maybe there are not precisely same features, but you can complete your task by usage the existing features - and maybe we can help you, if you give us some more details about your task.

I suppose (because I never used it, and I do not know anything about it) if the Immediate window is some watcing feature.
Here are the features of the StarbBasic IDE. There are watching features:
Basic IDE.png
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Arun P. Pai
Posts: 15
Joined: Thu Apr 26, 2018 7:53 am

Immediate Window

Post by Arun P. Pai »

Dear Sir,
What you want to achieve really? What is the "Immediate window"? What you want to do with it?
In the immediate window some simple queries can by extracted,

For example,
During Runtime or even during a passive stage we can get

1. The number of sheets in the document.
2. Parent details of the document, [Basically I use this to find out the where the document resides.]
3. Value of variable...like in Watch Window
4. I can even write small bits of code and test if it executes.
5. Make range selection, clear cell values
and many more such commands to the sheet object, without writing a proper Macro.
Private Sub GetSheetNames()
Dim mySht As Worksheet, SRC As Worksheet
Dim i As Integer, r As Integer
r = 6

Set mySht = Sheets("Sheet1")

With mySht
For i = 4 To 14
Set SRC = Sheets(i)
.Cells(r, "a") = SRC.Name
r = r + 1
Next i
End With
End Sub
Anwers to queries appearing in the Immediate Window for the above code
?sheets.Count
14
?r
6
?activesheet.parent.path
D:\Arun\xxxxxx\...gives the path where the doc resides.
?activesheet.name
Master
I am unable to attach the screen shot due to file size restrictions, sorry.

Thank you in advance.

Arun.
Arun
OS - Windows 8.1
Open Office 4.1.5
User avatar
Zizi64
Volunteer
Posts: 11361
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Immediate Window

Post by Zizi64 »

I am unable to attach the screen shot due to file size restrictions, sorry.
Optimize your pictures before you upload them here.
For screeshot pictures use 256 (or less) color depth PNG type images.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Post Reply