Okay, I'll admit that you probably have to be a parent of a young child to agree with this, but here it is:
[code]Application.Speech.Speak Target[/code]
This all started when I showed my kid how fast the computer could count to 100 with this code:
[code]Sub Count()
Dim lCount As Long
For lCount = 1 To 100
With ActiveCell
.Value = lCount
.Offset(1, 0).Select
End With
Next lCount
End Sub[/code]
We then moved up to "Wow, Daddy! Can it go to 1000?" Then eventually it was a contest to see if she could get her pyjamas on faster than the computer could count to 10,000.
This weekend, though, when testing out my new article on Having Excel Read a Range of Data to You, (written for someone who emailed me through the site,) I made the computer count to 10 out loud.
She was fascinated. Then we started with words...
The conversations got more complex line by line, with her talking to "Laptop". It took over 178 lines of conversation until Laptop finally sent her to bed. Great fun! (I will admit that I have a little fear that I just turned my laptop into a new game though!) 😉
6 thoughts on “The best line of VBA ever”
Ken, I may have missed the point, is there not a text to speach toolbar that does this already?
Hi Ross,
They removed it from the UI in Excel 2007. Don't ask me why...
I built an add-in last night to bring it back for a user.
Ken,
Enjoy the time the young lady sees You as her hero and not as a dinosauire (with a 'fat' wallet) 😉
Kind regards,
Dennis
oock!
God bless 2007!
I agree with you that this is the best line of VBA ever... data validation will never be the same for my clients.
"Error: There are no consonants in a dollar amount"
"Error: Nice try, why don't you take a break and try again later"
"Error: You fat-fingered the value... try exercising"
LOL! That's beautiful!
I can just see someone logging the attempts for a certain cell, with the feedback getting progressively more... poignant! 🙂