You could browse through http://www.ooomacros.org/ but I doubt that you will find a macro for such a purpose; after all, it is not a commonly used routine.

The OpenOffice macro recorder should be capable of recording such a routine. Your specifications are not sufficiently precise for someone to compose the macro for you; it may be possible, of course, to extract the remaining details from the VB macro.

ivan spajic wrote:
Dear Paul,

I could hardly call myself capable of learning Basic just for the purpose of translating or recording that one macro. If you know of a Opensource macro
that already does the following, I'd appreciate it greatly:
I need the ability to multiply rows according to the number in a specific
column (e.g. in a row I have "somethingA" in column 1 and the quantity of
it is stated in column 2; let's say the quantity is 4 - what the macro
should do is create 4 rows of "somethingA" with the quantity of 1 in column
2... it doesn't even have to have any quantity after the usage of the
macro...". Is there anything like that out there?

Ivan

On 16/11/06, Paul <[EMAIL PROTECTED]> wrote:

Without recoding, I don't believe that VB works in OOo. OOo has its
own native macro language - basic.

A good source of information on the language can be found here :
http://www.pitonyak.org/oo.php

/paul

On 11/16/06, ivan spajic <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've installed Open Office and really need to use a macro that works
fine in
> Excel to work fine in Calc as well.
>
> Here is the info:
> Microsoft XP professional, Version 2002, Service pack 2
> I've installed the Java version: jre-1_5_0_09-windows-i586-p-s from
> java.comsince I couldn't figure out what version I should download
> from
> java.sun.com by reading the release notes.
> My Open Office version is 2.0.4
> My Excel version is Microsoft Office Excel 2003
>
> The macro code goes like this:
>
> Option Explicit
> Sub repeat_BxN_Col3()
>    repeat_BxN (3)
> End Sub
>
> Sub repeat_BxN(Optional ColB As Long)
> 'Repeat row x Col B value  2003-08-22 in misc
>   Dim wsSource As Worksheet
>   Dim wsNew As Worksheet
>   Set wsSource = ActiveSheet
>   Dim rng As Range, rng2 As Range
>   Dim vRows As Long, colBstr As String
>   Dim I As Long
>   If ColB = 0 Then
>     On Error Resume Next
>     ColB = InputBox("Which column has Repetition Count", _
>       "Repetition", 2)
>     If Err.Number <> 0 Then Exit Sub
>     On Error GoTo 0
>   End If
>   Sheets(ActiveSheet.Name).Copy _
>        Before:=Sheets(ActiveSheet.Name)
>   Set wsNew = ActiveSheet
>   Application.ScreenUpdating = False
>   Application.Calculation = xlCalculationManual
>   Set rng = Cells.Columns(ColB) _
>         .SpecialCells(xlCellTypeConstants, 1)
>   Dim A As Long
>   For A = rng.Areas.Count To 1 Step -1
>     For I = rng.Areas(A).Count To 1 Step -1
>        Set rng2 = rng.Areas(A)(I).EntireRow
>        vRows = rng2.Cells(1, ColB).Value
>        rng2.Cells(1, ColB).Value = 1
>        If vRows > 1 Then
>         rng2.Resize(rowsize:=2).Rows(2).EntireRow. _
>          Resize(rowsize:=vRows - 1).Insert Shift:=xlDown
>        rng2.AutoFill rng2.Resize( _
>          rowsize:=vRows), xlFillCopy
>        End If
>     Next I
>   Next A
>   Application.Calculation = xlCalculationAutomatic
>   Application.ScreenUpdating = True
> End Sub
>
> The error that I get is this:
> BASIC syntax error
> Unknown data type Worksheet
>
> The program highlights row 9 in the OpenOffice.org Basic, where the
> Worksheet is mentioned.
>
> The macro works perfectly in Excel.
>
> Thanks a lot for your help
>
> Ivan Spajić
>


--
Try Torpark; a small portable, open-source, built on Firefox browser
that enables anonymous browsing. Requires no installation :
http://www.torrify.com/


--

If you're seeking, check out http://www.rci.org.au

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to