[Solved] Calc Macro to copy & paste cells

Creating a macro - Writing a Script - Using the API

[Solved] Calc Macro to copy & paste cells

Postby boyurboy » Thu Sep 02, 2010 3:33 am

Hello, all!

I cannot for the life of me figure this out quickly enough, so any help is greatly appreciated.

I need to cut cell contents (including formatting) for the currently selected cell in one sheet (from a table that is 6x80 cells)
and paste it to the first empty row on a list (one column in a separate sheet). I suspect about 200 of the values in the first sheet will be selected and pasted to the list.

I want to bind the macro to do this to a simple button, that way the user can select a cell, hit the button, and be done. Any notions on how to build the macro? I am an absolute novice at this, and my attempts to implement on my own have been futile. Thanks in advance!

- B.
Last edited by Hagar Delest on Thu Sep 02, 2010 4:55 pm, edited 1 time in total.
Reason: tagged [Solved].
OpenOffice 3.2 on Windows 7
boyurboy
 
Posts: 3
Joined: Thu Sep 02, 2010 3:27 am

Re: Calc Macro Help

Postby Charlie Young » Thu Sep 02, 2010 7:35 am

My attached example is hardly the only way to do this, and maybe more complicated than necessary. My "table" on sheet one, that is, the valid cells for copying from, is A2:A37, I have included various formatting in the characters there. The destination column is Column A of Sheet2. Hopefully it will be easy to modify to your exact purpose, but don't be afraid to ask questions here.
Attachments
Copy_By_Button.ods
Push button to copy cell
(11.77 KiB) Downloaded 2406 times
Apache OpenOffice 4.1.1
Windows XP
User avatar
Charlie Young
Volunteer
 
Posts: 1559
Joined: Fri May 14, 2010 1:07 am

Re: Calc Macro Help

Postby boyurboy » Thu Sep 02, 2010 3:48 pm

Thanks for the help! I think this is solved!
OpenOffice 3.2 on Windows 7
boyurboy
 
Posts: 3
Joined: Thu Sep 02, 2010 3:27 am

Re: [Solved] Calc Macro to copy & paste cells

Postby AndresAprende » Tue Sep 13, 2016 4:40 am

Thanks Charlie
LibreOffice Versi??n: 5.1.4.2 Id. de compilaci??n: 1:5.1.4-0ubuntu1
AndresAprende
 
Posts: 1
Joined: Fri Aug 05, 2016 7:21 pm


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 4 guests