Re: [api-dev] Re: How to re-select a multi selection with a macro?

2007-04-23 Thread Johnny Andersson
Yes, you are right. I just took a look at it. It seems like I have to find out myself. Exciting! =) Johnny Andersson 2007/4/23, Paolo Mantovani [EMAIL PROTECTED]: Hi Johnny, Alle 19:43, domenica 22 aprile 2007, Johnny Andersson ha scritto: 2007/4/21, Johnny Andersson [EMAIL PROTECTED]: I

Re: [api-dev] Re: How to re-select a multi selection with a macro?

2007-04-23 Thread Johnny Andersson
I didn't see that reply until now. Framework? Ok, I'll take a look at it later. Right now I am having another problem (still the same macro, but not the same problem), but I will write a separate thread about it. Johnny Andersson 2007/4/23, Volker Lenhardt [EMAIL PROTECTED]: Paolo Mantovani

[api-dev] Re: How to re-select a multi selection with a macro?

2007-04-22 Thread Johnny Andersson
2007/4/21, Johnny Andersson [EMAIL PROTECTED]: I know how to do that with simple selections (I am talking about Writer, but it would also be interesting to know the same about Calc) with only one selection, and I thought I figured out how to do it with several selections, but my idea failed

Re: [api-dev] Replaceing selected text with Basic Macro

2007-04-21 Thread Johnny Andersson
Thank you all for your replies. My last question never got answered (the one about re-selecting a multi selection), so I guess I should ask it again in a new thread and also do more experiments on my own. Johnny Andersson 2007/4/17, Mathias Bauer [EMAIL PROTECTED]: Johnny Andersson wrote

[api-dev] How to re-select a multi selection with a macro?

2007-04-21 Thread Johnny Andersson
reference to the macro manual will probably do as an answer to this question. Or just one or a few lines of example code. Many thanks for at least reading this! Johnny Andersson

Re: [api-dev] Replaceing selected text with Basic Macro

2007-04-17 Thread Johnny Andersson
2007/4/17, Paolo Mantovani [EMAIL PROTECTED]: Alle 00:31, martedì 17 aprile 2007, Johnny Andersson ha scritto: I have a small problem that I just can't figure out at these late hours (00:13 right now): I have written a macro that reads highlighted text and replaces it with something else

Re: [api-dev] Replaceing selected text with Basic Macro

2007-04-17 Thread Johnny Andersson
happens or did I do something wrong? I tried it a few times only. Do I have to check for this or can I just assume that if ThisComponent.CurrentSelection.getCount() 1 then ThisComponent.CurrentSelection(0).getText() is always empty? Johnny Andersson

Re: [api-dev] Replaceing selected text with Basic Macro

2007-04-17 Thread Johnny Andersson
is working and it works as long as I don't do multi selections. Johnny Andersson

[api-dev] Replaceing selected text with Basic Macro

2007-04-16 Thread Johnny Andersson
was run: Here is a sentence that will *show* my example. This would make it possible to run the macro once again and get the following result (still a fake example): Here is a sentence that will *help you to understand* my example. And so on... Thanks in advance Johnny Andersson

[api-dev] StarBasic - what to recommen and what to avoid?

2007-03-14 Thread Johnny Andersson
… It feels like objects works like classes. They have their own methods to handle their own variables, just like C++ classes, but can I create my own? Johnny Andersson

Re: [api-dev] Problen on insert rows

2007-02-04 Thread Johnny Andersson
talking about doing it manually, without a macro. And I just read that someone here might have delivered a better answer for you. Johnny Andersson

Re: [api-dev] Re: Variant vs other types...

2007-01-29 Thread Johnny Andersson
Thanks for your interesting reply! Parts of original messages and comments and maybe more questions below: 2007/1/29, Andrew Douglas Pitonyak [EMAIL PROTECTED]: Johnny Andersson wrote: Maybe I should put it another way: Let's say that I have these lines, among others: Dim Ctl

[api-dev] Most convenient way to delete cells in a macro?

2007-01-27 Thread Johnny Andersson
Hi! Sorry for bothering again... When I delete the contents of a cell in a macro (for a spreadsheet document) I just set ThisComponent.Value to 0 and .String to and maybe also .Formula to for each cell. Is there a quicker way to do this, requiring only one instruction? I want to obtain the

Re: [api-dev] Most convenient way to delete cells in a macro?

2007-01-27 Thread Johnny Andersson
for. Johnny 2007/1/27, TerryJ [EMAIL PROTECTED]: Johnny Andersson wrote: Hi! Sorry for bothering again... When I delete the contents of a cell in a macro (for a spreadsheet document) I just set ThisComponent.Value to 0 and .String to and maybe also .Formula to for each cell. Is there a quicker

Re: [api-dev] Most convenient way to delete cells in a macro?

2007-01-27 Thread Johnny Andersson
, m and s for Variant. That's why I'm asking... Johnny 2007/1/27, Paolo Mantovani [EMAIL PROTECTED]: Hi Johnny, Alle 13:04, sabato 27 gennaio 2007, Johnny Andersson ha scritto: Hi! Sorry for bothering again... When I delete the contents of a cell in a macro (for a spreadsheet document) I

Re: [api-dev] Most convenient way to delete cells in a macro?

2007-01-27 Thread Johnny Andersson
).getCellRangeByPosition(0,2,1,2)) Then {Do something} EndIf I guess that won't work either since IsEmpty only works for the Variant type. Johnny 2007/1/27, Paolo Mantovani [EMAIL PROTECTED]: Alle 13:04, sabato 27 gennaio 2007, Johnny Andersson ha scritto: [] I recorded a macro when I deleted a cell

[api-dev] Re: Strange time format...

2007-01-26 Thread Johnny Andersson
Forget about what I said about the type of Time and Date from those fields in the dialog I was talking about. I checked again and they are Long, not Double. Sorry for missleading... =) But I still wonder about the rest of what I wrote... Johnny 2007/1/26, Johnny Andersson [EMAIL PROTECTED

Re: [api-dev] Re: Strange time format...

2007-01-26 Thread Johnny Andersson
Marcelly [EMAIL PROTECTED]: Message de Johnny Andersson date 2007-01-26 09:30 : Forget about what I said about the type of Time and Date from those fields in the dialog I was talking about. I checked again and they are Long, not Double. Sorry for missleading... =) But I still wonder about

Re: [api-dev] Buttons are kind of flashing

2007-01-25 Thread Johnny Andersson
Thanks! Actually they do have colours! And they have graphics too (*.png)... Johnny 2007/1/26, Bernard Marcelly [EMAIL PROTECTED]: Message de Johnny Andersson date 2007-01-26 07:09 : Hi again... I made a couple of buttons on a spreadsheet, and I use them, of course, to run macros

[api-dev] About functions in different modules

2007-01-24 Thread Johnny Andersson
Hi! I am probably doing things the very wrong way again, as usual. I have a spreadsheet on which I put three buttons to call thrre different macros, which runs a couple of subroutines and functions. I want to write each macro in different modules and I want them all to follow the document,

Re: [api-dev] Dialogs: OK button can't call macros?

2007-01-24 Thread Johnny Andersson
. Johnny Andersson wrote, On 01/24/07 19:01: Hi! I am writing some StarBasic macros with OpenOffice.org Calc 2.1 on a Windows XP system. I also created a few dialogs with some fields like date, time, a combo box, an OK button and a cancel button. When creating the button I could set some things

[api-dev] Current Sheet

2006-06-22 Thread Johnny Andersson
I am writing a macro that is supposed to work on any spreadsheet. It will, when I'm done, be able to work on the current selection OR on the whole spreadsheet. The user can select that in a small dialog with two radiobuttons. I understand that ThisComponent.CurrentSelection is relevant for