Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Amend open Workbook code
This statement opens a 'text' file:
Workbooks.OpenText Filename:= _ "C:\BofQProject\Cato Import\B005A__1.EBQ", _ Origin:=xlWindows, StartRow:=13, _ DataType:=xlFixedWidth, FieldInfo:= _ Array(Array(0, 1), Array(13, 2), Array(71, 1), _ Array(73, 1), Array(109, 1)) I have this code which will get all files in a chosen folder: FName = (SourceDir & "\" & "*.EBQ") FName = Dir(FName) Do While Len(FName) 0 FileCounter = FileCounter + 1 ReDim Preserve FilesArray(1 To FileCounter) FilesArray(FileCounter) = FName FName = Dir() Loop How do I amend the following to open each workbook in turn, please? If FileCounter 0 Then Application.ScreenUpdating = False For LoopCounter = 1 To FileCounter Workbooks.Open vFilename & FilesArray(LoopCounter), False Regards. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.577 / Virus Database: 366 - Release Date: 03/02/2004 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
amend a VB code please | Excel Discussion (Misc queries) | |||
Amend the DV0022 - Update Validation Selections code for more lists | Excel Worksheet Functions | |||
Help on writing a code to copy and amend lines | Excel Programming | |||
Amend code or change it completely? | Excel Programming | |||
Amend form code to allow an option | Excel Programming |