Search found 35 matches

by Tobin
Tue Sep 08, 2009 10:18 pm
Forum: Macros and UNO API
Topic: Documentation of OpenOffice BASIC objects, etc.
Replies: 34
Views: 167178

Re: Need thorough documentation of OOo BASIC objects, etc.

Howdy mdawson69, Well I did a little experimenting and found the OOo 3.1.1 does support the "Option VBASupport 1" statement. In fact if I open a .xls with a macro in it, OOo adds the statement as long as the Tools -> Options -> Load/Save -> VBA Properties are appropriately checked. Attache...
by Tobin
Fri Sep 04, 2009 5:27 pm
Forum: Macros and UNO API
Topic: Documentation of OpenOffice BASIC objects, etc.
Replies: 34
Views: 167178

Re: Need thorough documentation of OOo BASIC objects, etc.

Howdy mdawson69, WOW - Soooo - let me get this straight. :shock: If I use the Novell Edition of OpenOffice, that has enhancements for VBA, all that is needed to write macros for Calc in VBA is add the "Option VBASupport 1" statement at the top of the macro. Am I really reading that right o...
by Tobin
Mon Apr 13, 2009 9:18 pm
Forum: Macros and UNO API
Topic: [Solved] Get MsgBox Return Value
Replies: 2
Views: 5710

Re: Get MsgBox Return Value

Fantastic - Thanks Villeroy! I doubt if I would have ever hacked my way into that ;) Sub MBox Dim iAnswer as Integer iAnswer = MsgBox ("An Existing Assembly Number Was Not Found. " + Chr(13) + _ "Would You Like to Create One?", 4, "Sling Shot") If iAnswer = 6 Then Print...
by Tobin
Mon Apr 13, 2009 3:26 pm
Forum: Macros and UNO API
Topic: [Solved] Get MsgBox Return Value
Replies: 2
Views: 5710

[Solved] Get MsgBox Return Value

Howdy, I hate to have to ask such a basic question but - I'm using a Yes/No Message Box for the first time and can't seem to get the return value when the user clicks either the Yes or No button. Will someone please show me how this is done? Sub MBox MsgBox ("An Existing Assembly Number Was Not...
by Tobin
Mon Mar 30, 2009 2:03 pm
Forum: Macros and UNO API
Topic: OO.o Basic Syntax Library
Replies: 1
Views: 2825

Re: OO.o Basic Syntax Library

Howdy, I've started going thru "OpenOffice.org Macros Explained" By Andrew Pitonyak. The book includes example code (downloaded separately) which I find very helpful when it comes to proper syntax. I'm not finished yet but the first few chapters and examples have been useful to me. http://...
by Tobin
Tue Mar 17, 2009 3:53 pm
Forum: Macros and UNO API
Topic: [Solved] Cell Text into ComboBox
Replies: 4
Views: 5912

Re: [Solved] Cell Text into ComboBox

Thanks Again FJCC! After reviewing your post and the reference you noted this is the code I will be using: (and probably any other ComboBox I need) Sub LoadComboBox Dim oForms as object, Sheet as object, CellRange as object Dim initParam(0) as new com.sun.star.beans.NamedValue Dim cbo_PrtNum as Obje...
by Tobin
Tue Mar 17, 2009 1:58 pm
Forum: Macros and UNO API
Topic: [Solved] Cell Text into ComboBox
Replies: 4
Views: 5912

Re: Cell Text into ComboBox

WOW! That worked flawlessly. That's way more complicated than I thought it might be. I would have never guessed that on my own. I really appreciate your help. I have a totally unrelated question. How do you create the "code" box, with the "Select All" and "Expand View" ...
by Tobin
Mon Mar 16, 2009 4:54 pm
Forum: Macros and UNO API
Topic: [Solved] Cell Text into ComboBox
Replies: 4
Views: 5912

[Solved] Cell Text into ComboBox

Howdy,

I'm trying to use a For Next loop to get some cell text into a ComboBox. I seem to be missing something. Attached is my CombpBox.ods example.

Can anybody help?
by Tobin
Fri Mar 13, 2009 3:41 am
Forum: Macros and UNO API
Topic: [Solved] Error Handler
Replies: 6
Views: 7024

Re: [Solved] Error Handler

UT OH! I had assumed (I know- I know) that: Dim This, That , Other, Thing As String meant that all four dimensions would be assigned as type String. I was looking at this as a really nice fast way to dimension a lot of objects the same type. So - what is the advantage of using the coma instead of ju...
by Tobin
Fri Mar 13, 2009 3:02 am
Forum: Macros and UNO API
Topic: [Solved] Error Handler
Replies: 6
Views: 7024

Re: Error Handler

Thank you very much FJCC, you've been very helpful :D .
by Tobin
Fri Mar 13, 2009 1:53 am
Forum: Macros and UNO API
Topic: [Solved] Error Handler
Replies: 6
Views: 7024

Re: Error Handler

Howdy, Thanks for being so patient with me :oops: I did take a quick look in the Global Index first but didn't find anything there. I have'nt had real good luck with the Basic Help for syntax and examples, but, obviously there is some in there. I hate to have to ask but - Is there a difference betwe...
by Tobin
Thu Mar 12, 2009 11:14 pm
Forum: Macros and UNO API
Topic: [Solved] Error Handler
Replies: 6
Views: 7024

[Solved] Error Handler

Howdy, I'm looking for a simple Error Handler. Something Like the following: Option Explicit Sub CreateList_V Dim Doc, Sheet as object Dim i, NxtRow as integer Dim ListCell, Num Sheet = ThisComponent.Sheets(0) Num = 1 NxtRow = 0 On Error goto exitErr For i = 0 to 4 ListCell = Sheet.getCellByPositio_...
by Tobin
Thu Mar 12, 2009 3:31 pm
Forum: Macros and UNO API
Topic: [Solved] Copy and Paste Syntax
Replies: 10
Views: 25456

Re: [Solved] Copy and Paste Syntax

Howdy,

Thank you both for replying.
<Cell2.String = Cell1.String> was what I was looking for - DA. Of course now that I'm looking at it, it seems so obvious. CopyRange is valuable to me as well - so I you gave me more than I expected :D .

Thanks Again
by Tobin
Thu Mar 12, 2009 3:07 pm
Forum: Macros and UNO API
Topic: [Solved] Copy and Paste Syntax
Replies: 10
Views: 25456

Re: Copy and Paste Syntax

OOPS!
I should have looked at the Global Index first ;)

Cell1 = Sheet.getCellRangeByPosition(0,0,0,2)
Cell2 = Sheet.getCellByPosition(1,0)
Sheet.copyRange(Cell2.CellAddress,Cell1.RangeAddress)

I'm still interested in other structures.

Thanks
by Tobin
Thu Mar 12, 2009 2:55 pm
Forum: Macros and UNO API
Topic: [Solved] Copy and Paste Syntax
Replies: 10
Views: 25456

Re: Copy and Paste Syntax

Thanks FJCC, Interesting structure, I would have never guessed :-) . This looks like it would work for a "Range" Copy and Paste as well. But - REM ***** BASIC ***** Sub Main Dim Cell1, Cell2 As Object Dim Sheet As Object Sheet = ThisComponent.Sheets(0) 'Cell1 = Sheet.getCellByPosition(1,1)...
by Tobin
Thu Mar 12, 2009 1:14 am
Forum: Macros and UNO API
Topic: [Solved] Copy and Paste Syntax
Replies: 10
Views: 25456

[Solved] Copy and Paste Syntax

I'm sure a simple "Clipboard" Copy and Paste from one cell to another must look something like the following, but, I'm obviously missing something (besides brains). REM ***** BASIC ***** Sub Main Dim Cell1, Cell2 As Object Dim Sheet As Object Sheet = ThisComponent.Sheets(0) Cell1 = Sheet.g...
by Tobin
Wed Mar 11, 2009 3:40 am
Forum: Macros and UNO API
Topic: [Solved] Loop thru Cell Range Syntax
Replies: 8
Views: 29470

[Solved] Loop thru Cell Range Syntax

OOPS - I thought I had already put the [Solved] in the subject box.

Thanks Again
by Tobin
Sat Mar 07, 2009 6:41 pm
Forum: Macros and UNO API
Topic: [Solved] Loop thru Cell Range Syntax
Replies: 8
Views: 29470

[Solved] Re: Loop thru Cell Range Syntax

Howdy, Sorry it took so long to get back. I finally had a chance to examine the search code you gave me. I had to start to rewrite it (dumb it down) until I finally understood. Very nice. I've attached my latest example work <CompareCellRangeExample>.ods. I noticed the way the code searches for a ma...
by Tobin
Fri Mar 06, 2009 3:29 am
Forum: Macros and UNO API
Topic: [Solved] Loop thru Cell Range Syntax
Replies: 8
Views: 29470

Re: Loop thru Cell Range Syntax

Howdy, Well - It took me a while, but - Sub GetData() Dim C3_E3, CellArray, cell1, cell2, cell3 'vForms = ThisComponent.CurrentController.ActiveSheet.DrawPage.Forms 'Form = vForms.getByName("Standard") Sheet = ThisComponent.Sheets(0) C3_E3 = Sheet.getCellRangeByPosition(2, 3, 5, 3) ' get d...
by Tobin
Thu Mar 05, 2009 10:41 pm
Forum: Macros and UNO API
Topic: [Solved] Loop thru Cell Range Syntax
Replies: 8
Views: 29470

Re: Loop thru Cell Range Syntax

Thanks FJCC for your effort on this. This macro is an experiment and is one function in a larger macro. When this macro is figured out (I'm feeling more confident it will be) it will be added to a larger macro. Concerning the Calc Sheet (ForNextLoopExample) Description: The (Default) first cell rang...
by Tobin
Thu Mar 05, 2009 8:36 pm
Forum: Macros and UNO API
Topic: [Solved] Loop thru Cell Range Syntax
Replies: 8
Views: 29470

Re: Loop thru Cell Range Syntax

Howdy, FJCC Thank you very much for your reply. This is very interesting code. I was not aware of the built in search function. Unfortunately I DO need to match each cell in the default range with a corresponding cell in the tested (searched) range. All cell text in the entire default range must be ...
by Tobin
Thu Mar 05, 2009 2:18 am
Forum: Macros and UNO API
Topic: [Solved] Loop thru Cell Range Syntax
Replies: 8
Views: 29470

[Solved] Loop thru Cell Range Syntax

Howdy, Looking for help with syntax OR I'm open to any suggestions. My goal is to: 1) loop thru a number of consecutive cell ranges to find a range that contains the matching text 2) use the found cell range to indicate which range matched Attached is my "ForNextLoopExample.ods" I'm using ...
by Tobin
Mon Feb 16, 2009 4:51 pm
Forum: Macros and UNO API
Topic: [Solved] Calc Cell Text into Dialog TextBox
Replies: 7
Views: 13288

Re: [Solved] Calc Cell Text into Dialog TextBox

WOW!

Thank you FJCC and Villeroy for your responses. I'm just a beginner at programming. I have a little experience with VB.net. I've mostly used that with the SolidWorks 3D modeling API. I started looking into OOo Basic because of a challenge from a co-worker :D .

Your posts are very helpful
by Tobin
Mon Feb 16, 2009 5:06 am
Forum: Macros and UNO API
Topic: [Solved] Calc Cell Text into Dialog TextBox
Replies: 7
Views: 13288

Re: [Solved] Calc Cell Text into Dialog TextBox

Howdy FJCC, Thanks for your reply. I would have never imagined <you shouldn't confuse OOo Basic with the API (Application Programming Interface) >. I find this surprising or a little disturbing ;) . I suppose it's been adding to my confusion as well. I've noticed the recorded macros are quite differ...
by Tobin
Sun Feb 15, 2009 4:22 am
Forum: Macros and UNO API
Topic: [Solved] Calc Cell Text into Dialog TextBox
Replies: 7
Views: 13288

Re: [Solved] Calc Cell Text into Dialog TextBox

Excellent! Very helpful reply. FJCC, you are obviously knowledgeable concerning OOo Basic. I appreciate your explanation of the code. I'm getting a feeling the net is loaded with old, incorrect or just plan misinformation when it comes to OOo Basic. If you don't mind - can I ask a couple questions? ...
by Tobin
Sat Feb 14, 2009 10:33 pm
Forum: Macros and UNO API
Topic: [Solved] Calc Cell Text into Dialog TextBox
Replies: 7
Views: 13288

[Solved] Calc Cell Text into Dialog TextBox

Howdy, I'm having difficulty figuring out how to get text from a Calc Cell into a TextBox on a Dialog. The attached zip file contains the Calc file I'm working with. The Sub I'm working on is Sub Accept. As you will see I have been trying many different approaches, so it's kind of full of old remark...
by Tobin
Sat Feb 14, 2009 9:56 pm
Forum: Macros and UNO API
Topic: [Solved] Start Macro Error
Replies: 2
Views: 2784

[Solved] Re: Start Macro Error

Fantastic!

I don't remember seeing that line in all the examples and research I've looked thru. That really makes sense though.

Thanks FJCC
by Tobin
Sat Feb 14, 2009 8:48 pm
Forum: Macros and UNO API
Topic: [Solved] Start Macro Error
Replies: 2
Views: 2784

[Solved] Start Macro Error

Howdy,

When I first start the macro I'm working on it causes an error. After acknowledging the error the macro starts without an error. Attached is a zip file containing the macro and a bmp of the error.

Do I have something set wrong?
Any suggestions would be appreciated.
by Tobin
Wed Feb 11, 2009 4:32 am
Forum: Macros and UNO API
Topic: [Solved] Modeless Dialog?
Replies: 5
Views: 8669

[Solved] Modeless Dialog?

Howdy,

Thanks Villeroy for your reply. I was sure I wasn't the only one looking for this :D .
Thanks for the pointer. I'll have to check those out later. Gota say though it seems strange it's not built in.

Thanks Again
by Tobin
Tue Feb 10, 2009 4:51 am
Forum: Macros and UNO API
Topic: [Solved] Modeless Dialog?
Replies: 5
Views: 8669

[Solved] Modeless Dialog?

Howdy, I've done a little research on this but I just want to confirm my findings are current. Is it true - there is no practical way, in OOo Basic, to create a Modeless Dialog for the user. I really need to let the user select buttons on the Form after the Dialog appears. Any suggestions or confirm...