When I try the lblBtnStartEndLunch.Text I still get a Syntax Error. I followed the example but used what I know to work for other instances when I assign a value to a Label. But those are usually just a single line or word.
The .Text option doesn’t appear either. And lblBtnStartEndLunch is the name of the object.
Well, in the first place that thread is ridiculous. Getting the text, try to split it, try to replace one of the array elements…
Just have an array already as a property of the window or a subclass of the label, add a method ReplaceLine(NewText As String, Line as Integer) and in there replace the item and then change the Caption using the Array.Join function
Edit: if you type in .Text it should also work. You won’t get autocomplete and you’ll get a deprecation warning in Analyze Project, but it should still compile and run. And you’ll be future-ready should you decide to upgrade to the current release.
Edit2: The property was .Text for the last 20 years. In 2019r2 they made the ill-advised decision to change it to .Value. In 2020r2 they finally changed it back.