Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default input box that ask for...

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



"Ella" wrote in message
oups.com...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default input box that ask for...

Mr.Tom O coded that. I take no credit. I believe i might have copied it
wrong. Just a little or a lot confused.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default input box that ask for...

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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default input box that ask for...

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to input pictures automatically based on cell input? bsharp Excel Worksheet Functions 9 May 30th 09 07:16 AM
input in number form is being multiplied by 1000 when i input. jweinograd Excel Discussion (Misc queries) 4 April 16th 07 11:18 PM
How do I add input data in the input ranges in drop down boxes. oil_driller Excel Discussion (Misc queries) 1 November 9th 05 10:31 PM
=SUMIF(Input!H2:H718,AZ19,Input!E2:E685)AND(IF ALex Excel Worksheet Functions 2 March 14th 05 09:19 PM
CODE to select range based on User Input or Value of Input Field Sandi Gauthier Excel Programming 4 December 8th 03 03:22 PM


All times are GMT +1. The time now is 12:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"