LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Need to make things simpler

I have a workbook that I run the following code in:

Dim FName As Variant
Dim BankNum As Integer
Dim i As Long
Dim aryWBs
ChDrive ActiveWorkbook.Path
ChDir ActiveWorkbook.Path
FName = Application.GetOpenFilename("CSV Files,*.csv", MultiSelect:=True)
ReDim aryWBs(LBound(FName) To UBound(FName))
For i = LBound(FName) To UBound(FName)
Set aryWBs(i) = Workbooks.Open(FName(i))


Application.ScreenUpdating = False
Next


I then display an input box that asks the user for a 3 digit number that
corresponds to the files they just opened. I would like to eliminate the need
for the input box but pulling the first three characters from any one of the
files that were just opened. All of the file they user will open will be
preceeded by a 3 digit number and that 3 digit number is the number I have
been asking them to input. I tried to do something like:

Dim BankNum as Integer
BankNum = Left(FName, 3)

or

Dim BankNum as String
BankNum = Left(FName, 3)

BUT neiher seemed to work down the road. Can anyone help?

 
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
Help with a procedure to make things easier Bill Excel Discussion (Misc queries) 6 February 7th 10 09:59 PM
need a template for quilters/crafts for things to make tah4480 Excel Worksheet Functions 0 January 10th 06 06:52 PM
How can I make this simpler? Sethaholic[_10_] Excel Programming 3 July 13th 05 08:20 PM
Make it more simple or intuitive to do simple things Vernie Charts and Charting in Excel 1 March 16th 05 04:01 AM
Need to make this simpler. Jack Excel Programming 2 September 21st 04 08:21 PM


All times are GMT +1. The time now is 08:48 AM.

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

About Us

"It's about Microsoft Excel"