input box that ask for...

  • Thread starter Thread starter Ella
  • Start date Start date
E

Ella

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
 
Ella,

Your code works fine for me as posted (aside from a missing End
Sub). What sort of problems are you having with the code.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Mr.Tom O coded that. I take no credit. I believe i might have copied it
wrong. Just a little or a lot confused.
 
okay i am exploring other options. What code would i use if i want 2
input box. The first one would ask for which week, then the second will
ask the last 6 digit in the filename
 
okay i am exploring other options. What code would i use if i want 2
input box. The first one would ask for which week, then the second will
ask the last 6 digit in the filename
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top