From: Nasim nbeiz...@gmail.com
To: MS EXCEL AND VBA MACROS excel-macros@googlegroups.com
Sent: Wed, January 5, 2011 11:41:10 PM
Subject: $$Excel-Macros$$ Copy files in folder except one file
Hi,
I need to combine several excel files into one file. I create this new
file in the directory
EXCEL AND VBA MACROS excel-macros@googlegroups.com
Sent: Wed, January 5, 2011 11:41:10 PM
Subject: $$Excel-Macros$$ Copy files in folder except one file
Hi,
I need to combine several excel files into one file. I create this new
file in the directory that user chooses (this folder contains
Thanks Ashish.
I did what you recommended and it considers the if result to be true
so goes through the all lines. I added watch for excelFile and it
shows me Combined Manual Timesheet.xls at the bottom of the page. I
am not sure why it does not recognize that in the if statement.
Thanks,
Nasim
to finish before all files are processed.
Paul
From: Nasim nbeiz...@gmail.com
To: MS EXCEL AND VBA MACROS excel-macros@googlegroups.com
Sent: Wed, January 5, 2011 11:41:10 PM
Subject: $$Excel-Macros$$ Copy files in folder except one file
Hi,
I need
Hi,
I need to combine several excel files into one file. I create this new
file in the directory that user chooses (this folder contains the
files I want to copy). It loops trough the files and works perfectly
except that it copies the combined Manual Timesheets.xls file and
pastes it to itself
try this it may help
Fpath = BrowseFolder(Caption:=Select the folder .)
excelFile = Dir(Fpath \*.xls)
Do While excelFile
If excelFile Combined Manual Timesheets.xls Then
Workbooks.Open Filename:=Fpath \ excelFile
' copy rows
ActiveWorkbook.Sheets(1).Activate
LastRow