Thank you Greg. You're right, it's a good practice to declare the variable
data type, and to put in the "Else". Sometimes I'm just in a hurry, esp.
for a small pgm like this that's just for occasional personal use. Since I
posted it to the public, I should have done it right. I do use the Option
Explicit to force me to at least put in the Dim statements. Thanks for
showing the use of Case for the MsgBox. I'll look at your web site, and get
started with user forms.
If anybody reading this is old enough to remember, there was an early space
shuttle flight that got delayed because of a computer programming problem.
It so happened that after this occured, I took a Fortran course at night, at
the University of Alabama in Huntsville (this was before there was such a
thing as a Computer Science major). My professor worked days in the space
program at Redstone Arsenal, and told us about this problem. The problem was
caused by the fact that if you don't define a variable, Fortran creates it
for you, unless you do the equivalent of an Option Explicit.
The program had a line that was supposed to be something like:
"DO 100 I = 1, 10" , the beginning of a loop. 100 was the line label at
the end of the loop.
But the comma was punched as a period (those were the days of punched cards) .
Since the Fortran compiler ignores spaces, except within quoted strings,
this statement was the same as writing "DO100I = 1.10"
So the compiler created the variable "DO100I" and set it equal to 1.10, and
ran the code in the intended loop once, instead of the intended 10 times!
> Patricia,
>
[quoted text clipped - 48 lines]
>
> Good luck.
Greg - 06 Apr 2006 20:30 GMT
Shannon,
< I'll look at your web site, and get started with user forms.
and there you will find a Userform representation of your suggestion:
http://gregmaxey.mvps.org/Recent_Files_List_Editor.htm
Thanks for the post.