[Solved] Immediate Window

Creating a macro - Writing a Script - Using the API

[Solved] Immediate Window

Postby Arun P. Pai » Wed Jul 04, 2018 4:52 am

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
Arun P. Pai
 
Posts: 13
Joined: Thu Apr 26, 2018 7:53 am

Re: Immediate Window

Postby Zizi64 » Wed Jul 04, 2018 6:43 am

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; LO4.4.7, LO6.1.6 on Win7-10 x64Prof.
PortableApps, winPenPack: LO3.3.0-6.2.4; AOO4.1.5
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.
User avatar
Zizi64
Volunteer
 
Posts: 7964
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Immediate Window

Postby Arun P. Pai » Wed Jul 04, 2018 10:10 am

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
Arun P. Pai
 
Posts: 13
Joined: Thu Apr 26, 2018 7:53 am

Re: Immediate Window

Postby Zizi64 » Wed Jul 04, 2018 1:20 pm

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; LO4.4.7, LO6.1.6 on Win7-10 x64Prof.
PortableApps, winPenPack: LO3.3.0-6.2.4; AOO4.1.5
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.
User avatar
Zizi64
Volunteer
 
Posts: 7964
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary


Return to Macros and UNO API

Who is online

Users browsing this forum: BenDev and 2 guests