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: 414
Default modification of auto-multiple workbook macro, Ron DeBruin (Copy4)

Hi Ron,
After I made the modifications to your copy4 macro, I've found the
following-- code first, then issue.
----------------------------------------------------
Dim myPath As String, FilesInPath As String
Dim MyFiles() As String, Fnum As Long
Dim myBook As Workbook


myPath = "S:\Assignments - Final\Truckee River Claims\"

FilesInPath = Dir(myPath & "DTR*.xl*")
If FilesInPath = "" Then
MsgBox "No Files Found"
Exit Sub
End If

Fnum = 0
Do While FilesInPath < ""
Fnum = Fnum + 1
ReDim Preserve MyFiles(1 To Fnum)
MyFiles(Fnum) = FilesInPath
FilesInPath = Dir()
Loop

If Fnum 0 Then
For Fnum = LBound(MyFiles) To UBound(MyFiles)
Set myBook = Nothing
On Error Resume Next
Set myBook = Workbooks.Open(myPath & MyFiles(Fnum))
On Error GoTo 0
Call ASaveNewFormat
Next Fnum
End If

End Sub
---------------------------------------------------
I have two primary issues.
1- This requires me to process all of the files in my directory, and I do
not want to re-process them, once I've done so if I get caught up in an
error.
As such, I tried changing the starting number of Fnum. I think that this is
where my error is stemming from, because it worked fine before I changed the
start # for Fnum.
2- How can I keep it from starting out at 0, and actually start at the file
number of my choosing, in the event I find that there is a file that the
routine will not process?
Thank you.

 
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
Ron DeBruin Macro - Moving Sheet Name from Last Column to Column A ScottMSP Excel Worksheet Functions 7 December 12th 08 06:07 PM
auto safe macro for workbook pswanie Excel Programming 6 June 17th 07 05:54 PM
auto run macro on workbook open Mcasteel[_43_] Excel Programming 2 November 15th 04 02:57 PM
auto run macro at workbook open Juan Guemes Excel Programming 2 August 28th 04 10:55 PM
VBA Excel 2000 - one shot multiple cells modification Conceptor Excel Programming 1 July 21st 03 05:40 PM


All times are GMT +1. The time now is 01:51 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"