Hello everyone!
I am a total newbie to macros, and I am struggling with what is probably a very simple task.
Basically I have a OOOcalc spreadsheet with a column of roughly 500 cells, each containing a 7-digit number. I want to make a macro as follows:
There is an input box for the user to type in a number and hit enter.
If the number entered IS NOT in the spreadsheet's column, then the program beeps once and goes back to the starting input box for another number to be typed in. However if the number IS in the column then the program beeps three times and pops up a warning "NUMBER FOUND! Type OK to proceed!" and then they must type OK, at which point the program returns to the first input box and the whole process repeats.
Not doubt this is simple to the experts here but I have hardly managed to get past the "InputBox" and "Beep" functions! I'm also having trouble telling calc to look at the "whole column" rather than a defined range.
If someone could please help me with the code for comparing the input with the column, that would be great... if you could even write me a sample macro that does this it would be fantastic... I am out of my depth at the moment.
[Solved] Please help a newbie with a simple Calc macro
[Solved] Please help a newbie with a simple Calc macro
Last edited by LabMan on Sun Dec 07, 2008 1:39 am, edited 1 time in total.
OOo 3.0.X on Ms Windows XP
Re: Please help a newbie with a simple calc macro
Please use the spreadsheet as is. You have cell-validation, form controls, conditional formatting (instead of acustic beep), and various lookup functions at hand. From my personal experience I can tell that this kind of request leads to nowhere because there are inherent misunderstandings when it comes to the preconditions of such an application, let alone the conception of "easy".
Most recent example: http://user.services.openoffice.org/en/ ... =9&t=12713
Most recent example: http://user.services.openoffice.org/en/ ... =9&t=12713
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Please help a newbie with a simple calc macro
Thanks Villeroy, I developed a perfectly good solution just using conditional formatting. Thanks for your advice, have a good one.
OOo 3.0.X on Ms Windows XP