Ask Your Question
1

LightsOn.ods

asked 2016-04-29 07:37:39 +0200

Gregm66 gravatar image

Hi all

can any one help me please, I have looked at JohnSUN file that he created called lightson.ods I have tried to re create this in a new project, but I can not get it to work maybe I have missed something I am not sure.

I copied the code over created a list put images in but no joy still wont work.

can anyone please help me with exactly how he has done this. I would prefer to have the images in a folder but if they have to be on a sheet then that's ok. basically what I have is a recipe holder using libre calc, so there are recipe names and my images are named the same as each recipe.

edit retag flag offensive close merge delete

Comments

I'm gladly help fix the problem. Just remind me, please, what kind of file it is - I forgot it...

JohnSUN gravatar imageJohnSUN ( 2016-04-29 07:47:51 +0200 )edit

it is a file that has 3 pictures of traffic lights on a sheet called Data then there is a sheet called Example this sheet has a selection list with red, green and yellow in it. so if I click on red the image changes to a red light, click on green and it changes to a green light.

Gregm66 gravatar imageGregm66 ( 2016-04-29 08:09:32 +0200 )edit

No, sorry, I can't find that workbook on my computer. Where is the link to download this file?

JohnSUN gravatar imageJohnSUN ( 2016-04-29 08:38:38 +0200 )edit

hang on I will find it

Gregm66 gravatar imageGregm66 ( 2016-04-29 08:39:21 +0200 )edit

I can not find it now is there a way I can attach the file here

Gregm66 gravatar imageGregm66 ( 2016-04-29 08:44:24 +0200 )edit
Gregm66 gravatar imageGregm66 ( 2016-04-29 08:54:23 +0200 )edit
Gregm66 gravatar imageGregm66 ( 2016-04-29 08:55:31 +0200 )edit

OK, I downloaded it - please wait ...

JohnSUN gravatar imageJohnSUN ( 2016-04-29 09:01:24 +0200 )edit

Look at property of this file :-) There is link http://ask.libreoffice.org/en/questio...

JohnSUN gravatar imageJohnSUN ( 2016-04-29 09:22:12 +0200 )edit

yes the link when I go there says its closed. so if there was any instructions on how to set it up I can not see them.

Gregm66 gravatar imageGregm66 ( 2016-04-29 09:31:52 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2016-04-29 09:16:33 +0200

JohnSUN gravatar image

updated 2016-04-29 09:17:04 +0200

Just specify that Calc must should be run this macro with every change in the data of current sheet. See picture.

image description

edit flag offensive delete link more

Comments

ok thanks I will try this

Gregm66 gravatar imageGregm66 ( 2016-04-29 09:52:57 +0200 )edit

oh 1 more question if I may. are the images in each sheet cell just done by insert image?

Gregm66 gravatar imageGregm66 ( 2016-04-29 10:09:06 +0200 )edit

ok I keep getting an error. ResultPicture = oSheet1.getDrawPage().getByIndex(0) <---- its on this line in the code

what does this line mean ----- > getDrawPage()

Gregm66 gravatar imageGregm66 ( 2016-04-29 10:32:33 +0200 )edit

Display your file, please (johnsun at i dot ua). It's hard for me to explain in a few words what DrawPage and why they may be on the same sheet of the workbook from zero to a large number of

JohnSUN gravatar imageJohnSUN ( 2016-04-29 10:42:36 +0200 )edit

i sent it to you cheers

Gregm66 gravatar imageGregm66 ( 2016-04-29 11:22:34 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-04-29 07:37:39 +0200

Seen: 249 times

Last updated: Apr 29 '16