How to get text from cell and copy it to clipboard when next button pressed?

Hi, greetings from new member here.
i’m new to this libre stuff and i need to make small program for my work.
so here’s my exlanation.

ss2

from image above, i need to display code (selected cell) from sheet in B2 to cell content (text field), and whenever i press next button the selected cell move down by 1 cell and copy the code to clipboard and so on.

same case for previous button but the selected cell move up by 1 cell.

do you think you can help me for this? any help would be appreciated.
and i’m sorry if this a double topic, please link me to that topic.

thanks!

Please study Andrew Pitonyak’s free macro books.
https://www.pitonyak.org/oo.php

You must learn about the API functions first.
You have not attached any sample macro code here, and I suppose - based on this fact - that you have not any clue, how you can get the Spreadsheet, or a Sheet, a Cell, and some Cell content in a StarBasic macro subroutines by calling of the API functions.

You must assign these macro subroutines to an event of the Form control elements of your Form.

1 Like

Could it be like this :-)?
dialogWithCtrlC.ods (13.3 kB)

3 Likes

hey thank you for this wonderfull file. its work like i wanted. i’ll use this as reference for deep learning later. bless you.

@Zizi64 thank you for the link you gave, its filled with many thing that i didnt understand right now but i’m eager to learn new thing.