SOLVED ANSWER PROVIDED BY A FORUM MEMBER AND ADJUSTMENTS I PERFORMED FOR IMPLEMENTATION
//////////////////////////////////////////////////////////////////////////////////////////////
The answer provided by: Matareuz was the correct methodology, so thank you very much!
I only made a small append of:
Code: Select all
REM deal with a cleared field, or error change to something else
Case Else
oRange = CreateRange(oActiveSheet,RangueAddress.StartColumn+c,RangueAddress.StartRow+r)
oRange.CellBackColor = RGB ( 255, 255, 255 )
At the bottom of the sheet to which I desired to assign the macro, I right-clicked the name.
this gave me a context menu (on Windows 10 Pro) with an option called, "Sheet Event" - which I selected.
A dialogue window named "assign action" rendered, with the option selection was "Content Changed"
which I selected, and then clicked "Macro..." under the "Assign:" in the top right of that dialogue.
Where i was able to select the Macro itself. This is a generic style change for color coding, so it isn't a requirement to bind it to the sheet, being aesthetic. so i saved it in my macros so we could simply assign it to each created sheet manually (for now) while I build the automation to avoid ever building these things again
I apologize for my late reply, and pre-pend of success on this post - this is a side project (what I'm doing with Open Office and LibreOffice) and my full time life is quite demanding. thank you to everyone for your answers
I truly hope this helps someone else.
//////////////////////////////////////////////////////////////////////////////////////////////
ORIGINAL QUESTION BELOW
//////////////////////////////////////////////////////////////////////////////////////////////
After reading as many forum posts as time is allotting, and reading the tutes and such, I still haven't found a solution that solves something which should be simple. In code I have a function to simply do a field test in a web form, but this is apparently not that simple heh
I want to handle multiple elements in a single entry, in every cell which is selected within the sheet to which the function should apply
if the field text is equal to Tom, Dick, or Harry irrelevant of the case or mixed case etc then change the background color to yellow
if the field text is equal to Jane, Mary, or Sue irrelevant of case or mixed case etc then change the background color to pink
if anything else is entered into the field, do nothing.
so
Code: Select all
if (TEXT(VALUE=["tom","mary","sue"]) use style "yellow") endif
if (TEXT(VALUE=["jane","mary","sue"]) use style "pink") endif