Macro Openoffice Calc
Claire
-
bordelaplage Posted messages 16 Registration date Status Member Last intervention -
bordelaplage Posted messages 16 Registration date Status Member Last intervention -
I just transferred an Excel file to OpenOffice, and I had a macro button that allowed me to adjust the row height which no longer works. I wanted to create this macro in OpenOffice Calc, and without knowing Basic, I recorded it. Tools / Macro / Record / then I selected the entire document, and by clicking on a random line break, all the rows adjust, then Finish recording.
Then, when I run the macro, nothing happens. Is this a problem of functionality, language or something else...
Thank you for your help.
Note: If you would like to send me the written macro, I would be happy.
Then, when I run the macro, nothing happens. Is this a problem of functionality, language or something else...
Thank you for your help.
Note: If you would like to send me the written macro, I would be happy.
58 answers
- 1
- 2
- 3
Next
It is unfortunately normal... Macros are difficult to import into OpenOffice.
Macros are not managed in the same way because the source code of MS Office formats is not available. Therefore, it requires reprogramming to retrieve the precious macros we use every day... :(
To create your macros, I refer you to the following link that may be helpful: http://perso.wanadoo.fr/pedagologic/documents/MacroOOo.pdf
Hoping this will help you.
Macros are not managed in the same way because the source code of MS Office formats is not available. Therefore, it requires reprogramming to retrieve the precious macros we use every day... :(
To create your macros, I refer you to the following link that may be helpful: http://perso.wanadoo.fr/pedagologic/documents/MacroOOo.pdf
Hoping this will help you.
So I have the solution to your problem, it's very simple actually. Once you've done everything, namely the recording and the macro, just go to the button you've created, right-click on it, and go to assign a macro. There you specify which macro it is and confirm with ok, and it should be fine...
There you go, I hope you'll manage, see you soon.
There you go, I hope you'll manage, see you soon.
Good evening everyone
As part of my job, I need to transfer a copy from a Calc sheet to a Writer document at a specific location
The best would be to have a macro in Calc with an action button.
Thank you in advance
As part of my job, I need to transfer a copy from a Calc sheet to a Writer document at a specific location
The best would be to have a macro in Calc with an action button.
Thank you in advance
Hello Lami20j
Would it be possible for me to send you the complete file? And by what means? On the site?
JM
Would it be possible for me to send you the complete file? And by what means? On the site?
JM
Good evening Claire,
Is it a functionality issue, a language issue, or something else..
Yes, it's a language issue. In the MsOffice pack, we use VBA (Visual Basic for Applications) and in Open Office, we use OooBasic.
Here's your macro.
If you don't know where to write the code, let me know, I will explain it to you.
lami20j
Is it a functionality issue, a language issue, or something else..
Yes, it's a language issue. In the MsOffice pack, we use VBA (Visual Basic for Applications) and in Open Office, we use OooBasic.
Here's your macro.
Sub adjust_rows() ThisComponent.currentController.activeSheet.Rows.Height = 400 End SubThe macro adjusts the rows of the active sheet (400 is for a height of 0.40 cm)
If you don't know where to write the code, let me know, I will explain it to you.
lami20j
Hello
Actually, it's not about hacking, it's about doing a good job in the best timeframe.
If I don't finish this project within 3 weeks, I might get fired. Please help me transfer the Excel VBA 2003 files to Open Office 3.0 Basic.
The files are extremely numerous (a company with over 700 employees) and I can't afford to reprogram under Open Office as I'm incapable of doing so (level 0).
When I set OPTION VBASupport 1, I realize that it accepts certain expressions but not others, like Application.Run("Showall"). Help me find a solution.
Thank you.
Actually, it's not about hacking, it's about doing a good job in the best timeframe.
If I don't finish this project within 3 weeks, I might get fired. Please help me transfer the Excel VBA 2003 files to Open Office 3.0 Basic.
The files are extremely numerous (a company with over 700 employees) and I can't afford to reprogram under Open Office as I'm incapable of doing so (level 0).
When I set OPTION VBASupport 1, I realize that it accepts certain expressions but not others, like Application.Run("Showall"). Help me find a solution.
Thank you.
Hello, my problem is the following: I am making a program for "work" and the problem is that until now, even without too much knowledge, I was able to modify the program in Excel and OpenOffice Calc. However, there was a macro in the Excel program (Microsoft) that allowed me to send the file I was on as an attachment to a given address (all this contained in the macro). Knowing that we don't program the same way in OpenOffice Calc, could you please give me the lines of the program since I am at zero level for this :) (Visual Basic for the macro normally) Thank you very much.
Il me le faut sous forme de macro car c'est très important et la version EXCEL (Microsoft) l'a en macro, c'est pour simplifier au maximum, ils cliquent et ça envoie... la macro est sur EXCEL, il me la faut adaptée sur la version CALC (OpenOffice).
Hello,
I have a major problem that is hindering my progress on a very important project.
I have a table, but the content from one cell to another is not the same, so I would like, magically, a blank line to appear whenever the content is different.
Is that possible?
If so, could you please help me?
I have a major problem that is hindering my progress on a very important project.
I have a table, but the content from one cell to another is not the same, so I would like, magically, a blank line to appear whenever the content is different.
Is that possible?
If so, could you please help me?
Hello
I'm facing the same problem as you: openoffice calc macro
Have you found a solution since 2005?
Thank you for your response
See you
lato716@hotmail.com
I'm facing the same problem as you: openoffice calc macro
Have you found a solution since 2005?
Thank you for your response
See you
lato716@hotmail.com
Bonjour, je suis novice dans la programmation, j'aurais voulu savoir s'il y avait un moyen de transférer d'un tableau Open Office, des données bien précises vers un autre tableau Open Office déjà existant par le biais d'une seule touche autre que copier-coller ou truc du genre. Peut-être avec VB, je n'en sais rien mais bon.
Here is an example of code to perform a copy-paste between two workbooks:
https://forum.openoffice.org/fr/forum/ftopic6371.html
Happy coding
--
Why hack MS Office when there is a free solution? Use OpenOffice.org
https://forum.openoffice.org/fr/forum/ftopic6371.html
Happy coding
--
Why hack MS Office when there is a free solution? Use OpenOffice.org
```plaintext
Hello everyone, a big problem for the development of a personal project, need help
I am sending you below a VB macro, which allows me to transpose values into a table in the first empty line. I don't know how to transform it into Ooo BASIC.
Sub transpose_into_table()
'Access a sheet and memorize the data
Sheets("Sheet1").Select
Range("C4:C21").Select
Selection.Copy
'Test to determine the line where to paste the info in the table
Sheets("Sheet2").Select
valueD12 = Range("D12").Value
If valueD12 = "" Then
Range("D12").Select
Else
Range("D11").Select
Selection.End(xlDown).Select
active_row_base = ActiveCell.Row
Range("D" & active_row_base + 1).Select
End If
'Memorize the row number where to paste'
active_row_base = ActiveCell.Row
'Pasting with transposition'
Range("D" & active_row_base).Select
Selection.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=True
'Clear the sheet'
Sheets("Sheet1").Select
Range("C4:C10,C12:C21").Select
Selection.ClearContents
Range("C4").Select
'Go to another table'
Sheets("Sheet3").Select
Range("B6").Select
End Sub ```
I am sending you below a VB macro, which allows me to transpose values into a table in the first empty line. I don't know how to transform it into Ooo BASIC.
Sub transpose_into_table()
'Access a sheet and memorize the data
Sheets("Sheet1").Select
Range("C4:C21").Select
Selection.Copy
'Test to determine the line where to paste the info in the table
Sheets("Sheet2").Select
valueD12 = Range("D12").Value
If valueD12 = "" Then
Range("D12").Select
Else
Range("D11").Select
Selection.End(xlDown).Select
active_row_base = ActiveCell.Row
Range("D" & active_row_base + 1).Select
End If
'Memorize the row number where to paste'
active_row_base = ActiveCell.Row
'Pasting with transposition'
Range("D" & active_row_base).Select
Selection.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=True
'Clear the sheet'
Sheets("Sheet1").Select
Range("C4:C10,C12:C21").Select
Selection.ClearContents
Range("C4").Select
'Go to another table'
Sheets("Sheet3").Select
Range("B6").Select
End Sub ```
Hi,
You keep the keyword only for comments, but from what I've seen, there are no comments, so you can remove Rem
--
106485010510997108
You keep the keyword only for comments, but from what I've seen, there are no comments, so you can remove Rem
--
106485010510997108
Thank you Lami20j
I sent it to you, I saved it as MS 97 but I realize it's only about a hundred KB when it's much more?
Shouldn't you have saved it as .ODP?
Thank you
I sent it to you, I saved it as MS 97 but I realize it's only about a hundred KB when it's much more?
Shouldn't you have saved it as .ODP?
Thank you
Hi,
Well, if it's OpenOffice.org then save it in an OpenOffice.org format.
You can compress the file if it's too large.
--
106485010510997108
Well, if it's OpenOffice.org then save it in an OpenOffice.org format.
You can compress the file if it's too large.
--
106485010510997108
Good evening Lami20j,
I hope I have sent it in the right format (Template) but it seems a bit light to me!
Have a good evening
JM
I hope I have sent it in the right format (Template) but it seems a bit light to me!
Have a good evening
JM
Re,
Thanks for everything you do!!
Unfortunately, my file is apparently too large for cjoint.com, but I deleted several lines to make it manageable and I'm finally sending it in several parts (all are necessary for the macro to work).
https://www.cjoint.com/?ergREklbHk
https://www.cjoint.com/?ergSoNWYBD
https://www.cjoint.com/?ergSLVehjk
These three files are super important so they must be in the correct folder that you will choose.
Then there is the big file (where the macros are) but it is too large for cjoint.com?? Do you have an idea for how I can get it to you? By email, for example?
Thanks for everything you do!!
Unfortunately, my file is apparently too large for cjoint.com, but I deleted several lines to make it manageable and I'm finally sending it in several parts (all are necessary for the macro to work).
https://www.cjoint.com/?ergREklbHk
https://www.cjoint.com/?ergSoNWYBD
https://www.cjoint.com/?ergSLVehjk
These three files are super important so they must be in the correct folder that you will choose.
Then there is the big file (where the macros are) but it is too large for cjoint.com?? Do you have an idea for how I can get it to you? By email, for example?
Re,
I'm sending it in several pieces (all are useful for the macro to work).
I'm going to mix things up.
What you sent are CSV files, so I won't have any macros in there.
What I need is to send your Excel file that contains the macros.
I will take care of opening it myself with OpenOffice.
Try to compress your file before sending it.
--
106485010510997108
I'm sending it in several pieces (all are useful for the macro to work).
I'm going to mix things up.
What you sent are CSV files, so I won't have any macros in there.
What I need is to send your Excel file that contains the macros.
I will take care of opening it myself with OpenOffice.
Try to compress your file before sending it.
--
106485010510997108
Hi,
I'm sorry, you can think I'm useless; that's normal, I think I am because I no longer know how to compress a file?
I'm sorry, you can think I'm useless; that's normal, I think I am because I no longer know how to compress a file?
Hello everyone,
I would like to know if it is possible to create a button in OpenOffice Calc that, when clicked, would increment the value of a cell?
In fact, you would first have to click on the cell you want and then click on the button to increment the value of that cell.
Is this possible??
Sincerely
I would like to know if it is possible to create a button in OpenOffice Calc that, when clicked, would increment the value of a cell?
In fact, you would first have to click on the cell you want and then click on the button to increment the value of that cell.
Is this possible??
Sincerely
```html
Incrementation
----------------------------------------------------------------------
define variables
dim document as object
dim dispatcher as object
----------------------------------------------------------------------
get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "ToPoint"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())
----------------------------------------------------------------------
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "StringName"
args2(0).Value = "1"
dispatcher.executeDispatch(document, ".uno:EnterString", "", 0, args2())
Ensuite tu as plus qu'a crée un bouton et en lui linkant ta macro pour qu'elle se déclenche quand tu appuie sur le bouton.
Enjoy ;) ```
dim document as object
dim dispatcher as object
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "ToPoint"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "StringName"
args2(0).Value = "1"
dispatcher.executeDispatch(document, ".uno:EnterString", "", 0, args2())
Ensuite tu as plus qu'a crée un bouton et en lui linkant ta macro pour qu'elle se déclenche quand tu appuie sur le bouton.
Enjoy ;) ```
Hello,
I am desperately looking for someone who can help me improve a program already created with OPEN OFFICE 4.0.1 on 2 sheets
I need to extend this unfinished program to the 3rd and 4th sheets
The explanations & files are here:
http://www.technifree.com/modules/newbb/viewtopic.php?start=30&topic_id=1803&viewmode=flat&order=ASC
P.S. Otherwise, can you direct me to other people or sites
This is URGENT please, due to the delays in my research that have been piling up since ........
Thank you for your attention and your help
I am 56 years old, separated, looking for a job
In exchange, I can offer (gift vouchers, PSG jersey Ibrahimovic or Beckham, Harley Davidson alarm clock.........NEW)
If you want to contact me:
s.patrick315@aliceadsl.fr
I am desperately looking for someone who can help me improve a program already created with OPEN OFFICE 4.0.1 on 2 sheets
I need to extend this unfinished program to the 3rd and 4th sheets
The explanations & files are here:
http://www.technifree.com/modules/newbb/viewtopic.php?start=30&topic_id=1803&viewmode=flat&order=ASC
P.S. Otherwise, can you direct me to other people or sites
This is URGENT please, due to the delays in my research that have been piling up since ........
Thank you for your attention and your help
I am 56 years old, separated, looking for a job
In exchange, I can offer (gift vouchers, PSG jersey Ibrahimovic or Beckham, Harley Davidson alarm clock.........NEW)
If you want to contact me:
s.patrick315@aliceadsl.fr
- 1
- 2
- 3
Next
I have the following problem, my entire macro displays 'Rem' at the beginning of each line? And when I correct all the lines without the 'Rem' and then re-edit the macro, everything has returned to the example below?
I have a file "Fabien.XLT"
Thank you
Rem Attribute VBA_ModuleType=VBAFormModule
OPTION VBASupport 1
Sub Command
Rem Private Sub CommandButton6_Click()
Rem
Rem End Sub
Rem
Rem Private Sub CommandButton8_Click()
Rem Sheets("Data").Select
Rem ActiveSheet.Shapes("WordArt 4").Select
Rem Selection.Copy
Rem Sheets("DF").Select
Rem Range("E1").Select
Rem ActiveSheet.Paste
Rem Selection.ShapeRange.IncrementLeft -70.5
Rem Selection.ShapeRange.IncrementTop -8.25
Rem Range("E3").Select
Rem Dim vFichier As String, vChemin As String
Rem vChemin = "d:\FG entreprise\Factures\"
Rem vFichier = vChemin & ("F") & ("_") & ActiveSheet.Range("H1") & ("_") & ActiveSheet.Range("F8")
Rem ActiveWorkbook.SaveAs Filename:=(vFichier)
Rem End Sub
Rem
Rem Private Sub arretroyal_Click()
Rem
Rem End Sub
Rem
Rem Private Sub DEVIS_Click()
Rem Sheets("Data").Select
Rem ActiveSheet.Shapes("WordArt 3").Select
Rem Selection.Copy
Rem Sheets("DF").Select
Rem Range("F1").Select
Rem ActiveSheet.Paste
Rem Selection.ShapeRange.IncrementLeft -76.5
Rem Selection.ShapeRange.IncrementTop -9.75
Rem Selection.ShapeRange.IncrementLeft -3#
Rem Selection.ShapeRange.IncrementTop -0.75
Rem Range("H1:I1").Select
Rem End Sub
Rem
Rem Private Sub devisrenvoyer_Click()
Rem With ActiveSheet.PageSetup
Rem .BlackAndWhite = False
Rem End With
Rem ActiveSheet.PrintOut
Rem With ActiveSheet.PageSetup
Rem .BlackAndWhite = True
Rem End With
Rem ActiveSheet.PrintOut
Rem End Sub
Rem
Rem Private Sub Facture_Click()
Rem Sheets("Data").Select
Rem ActiveSheet.Shapes("WordArt 4").Select
Rem Selection.Copy
Rem Sheets("DF").Select
Rem Range("E1").Select
Rem ActiveSheet.Paste
Rem Selection.ShapeRange.IncrementLeft -35.25
Rem Selection.ShapeRange.IncrementTop -11.25
Rem Range("H1:I1").Select
Rem End Sub
Rem
Rem Private Sub Image1_Click()
Rem
Rem End Sub
Rem
Rem Private Sub print_couleur_bw_Click()
Rem With ActiveSheet.PageSetup
Rem .BlackAndWhite = False
Rem End With
Rem ActiveSheet.PrintOut
Rem With ActiveSheet.PageSetup
Rem .BlackAndWhite = True
Rem End With
Rem ActiveSheet.PrintOut
Rem With ActiveSheet.PageSetup
Rem .BlackAndWhite = False
Rem End With
Rem End Sub
Rem
Rem Private Sub Sfacture_Click()
Rem Dim vFichier As String, vChemin As String
Rem vChemin = "c:\MN entreprise\Factures\"
Rem vFichier = vChemin & ("F") & ("_") & ActiveSheet.Range("H1") & ("_") & ActiveSheet.Range("F8")
Rem ActiveWorkbook.SaveAs Filename:=(vFichier)
Rem End Sub
Rem
Rem Private Sub Svdevis_Click()
Rem Dim vFichier As String, vChemin As String
Rem vChemin = "d:\FG entreprise\Devis\"
Rem vFichier = vChemin & ("D") & ("_") & ActiveSheet.Range("H1") & ("_") & ActiveSheet.Range("F8")
Rem ActiveWorkbook.SaveAs Filename:=(vFichier)
Rem End Sub
Rem
Rem Private Sub TVA21_Click()
Rem ActiveWindow.ScrollRow = 20
Rem Range("G47").Select
Rem Sheets("Data").Select
Rem Range("A4").Select
Rem Selection.Copy
Rem Sheets("DF").Select
Rem ActiveSheet.Paste
Rem Application.CutCopyMode = False
Rem Range("H47:I47").Select
Rem Sheets("Data").Select
Rem Range("B4").Select
Rem Selection.Copy
Rem Sheets("DF").Select
Rem ActiveSheet.Paste
Rem Application.CutCopyMode = False
Rem Sheets("DF").Select
Rem End Sub
Rem
Rem Private Sub TVA6_Click()
Rem Range("G47").Select
Rem Sheets("Data").Select
Rem Range("A3").Select
Rem Selection.Copy
Rem Sheets("DF").Select
Rem ActiveSheet.Paste
Rem Application.CutCopyMode = False
Rem Range("H47:I47").Select
Rem Sheets("Data").Select
Rem Range("B3").Select
Rem Selection.Copy
Rem Sheets("DF").Select
Rem ActiveSheet.Paste
Rem Application.CutCopyMode = False
Rem Range("A48").Select
Rem End Sub
Rem
Rem Private Sub TVACC_Click()
Rem Range("G47").Select
Rem Sheets("Data").Select
Rem Range("A6").Select
Rem Selection.Copy
Rem Sheets("DF").Select
Rem ActiveSheet.Paste
Rem Application.CutCopyMode = False
Rem Range("H47:I47").Select
Rem Sheets("Data").Select
Rem Range("B6").Select
Rem Selection.Copy
Rem Sheets("DF").Select
Rem ActiveSheet.Paste
Rem Application.CutCopyMode = False
Rem Range("B46").Select
Rem Sheets("Data").Select
Rem ActiveSheet.Shapes("AutoShape 1").Select
Rem Selection.Copy
Rem Sheets("DF").Select
Rem ActiveSheet.Paste
Rem Selection.ShapeRange.IncrementLeft 47.25
Rem Selection.ShapeRange.IncrementTop -1.5
Rem Range("A48").Select
Rem End Sub
Rem
Rem Private Sub UserForm_Click()
Rem
Rem End Sub
Rem
End Sub
Yes, I tried OPTION VBASupport 1 and it works great.
However, does it work for all VB programs??
Thanks for your help!!
Meanwhile, I have another question:
Can you help me with a specific point that is really blocking me.
Actually, I can’t execute my macros step by step (let’s say I don’t know at all how to do it on Open Office). If I press F8, I execute a macro (the first one), but then I can’t get out of it and execute the next ones.
Thank you for your attention.
does this work for all VB programs??
Don't confuse VB with VBA.
For the second question, a bit more detail is needed.
--
106485010510997108