View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ella[_2_] Ella[_2_] is offline
external usenet poster
 
Posts: 12
Default input box that ask for...

what is another way to have a input box pop up and ask what the last 6
digit of a particular file name is?

I know parts of the file properties. It start with "afilename but after
that it has 6 digit the .xls

I want to create a macro that will look for this particular filename
but seperately ask for the last 6 digit.

Was that confusing?
This was an advised statement but i came up with an error message.
what did i do wrong?

Sub OpenFile()
Dim title As String, ans As String
title = ""
ans = InputBox("Enter the 6 digit number")
If Len(ans) < 6 Or Not IsNumeric(ans) Then
MsgBox "Incorrect, try again"
Exit Sub
End If