View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default VBA Equivalent for Excel Function

You can test this way (where the variable FileName is assumed to hold the
filename entered by the user)...

If FileName Like "*########.xls" Then
MsgBox "The shape of the filename appears to be correct"
Else
MsgBox "Something appears to be wrong with the filename"
End If

If the

--
Rick (MVP - Excel)


"Bob Zimski" wrote in message
...
I am looking for the VBA equivalent for the following function:

=isnumber(value(mid("Export20090224.xls",7,8)))

What I am trying to do is make sure that when the user saved the filename
that they entered the date properly as in 20090224 rather than 2009224.
Maybe
this is a weak approach as I am just testing for the length more than
enything else. Can I get the date from the 'saved date' stamp pehaps?

If there is an even better way of doing this, then that would be great.

Thanks