The best line of VBA ever
Okay, I'll admit that you probably have to be a parent of a young child to agree with this, but here it is:
-
Application.Speech.Speak Target
This all started when I showed my kid how fast the computer could count to 100 with this 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
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!)
on May 7th, 2008 at 1:42 am
Ken, I may have missed the point, is there not a text to speach toolbar that does this already?
on May 7th, 2008 at 6:58 am
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.
on May 8th, 2008 at 8:37 am
Ken,
Enjoy the time the young lady sees You as her hero and not as a dinosauire (with a 'fat' wallet)
Kind regards,
Dennis
on May 9th, 2008 at 1:04 am
oock!
God bless 2007!
on June 13th, 2008 at 6:33 am
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"
on June 13th, 2008 at 8:39 am
LOL! That's beautiful!
I can just see someone logging the attempts for a certain cell, with the feedback getting progressively more... poignant!