PC Review


Reply
 
 
=?Utf-8?B?SGFzc2Fu?=
Guest
Posts: n/a
 
      22nd Sep 2007
Hi All,

Is it possible to apply macro on every file in specified folder?

Thanks & Regards

Hassan
 
Reply With Quote
 
 
 
 
Guest
Posts: n/a
 
      22nd Sep 2007
Yes it is.

"Hassan" <(E-Mail Removed)> az alábbiakat Ã*rta a következÅ‘ hÃ*rüzenetben: BC30192A-8DBD-423F-9961-(E-Mail Removed)...
> Hi All,
>
> Is it possible to apply macro on every file in specified folder?
>
> Thanks & Regards
>
> Hassan

 
Reply With Quote
 
=?Utf-8?B?Sm9lbA==?=
Guest
Posts: n/a
 
      22nd Sep 2007
Here is an example

Sub opendir()

Dim FileSize As Long
Mydir = "c:\temp"

RowCount = 1
First = True
Do

If First = True Then
Myfilename = Dir(Mydir & "\*.xls")
First = False
Else
Myfilename = Dir
End If

If Myfilename <> "" Then
Workbooks.Open (Mydir & "\" & Myfilename)

'enter you code here

Workbooks(Myfilename).Close

End If
Loop While Myfilename <> ""

End Sub


"tomi12619" wrote:

> Yes it is.
>
> "Hassan" <(E-Mail Removed)> az alábbiakat Ã*rta a következÅ‘ hÃ*rüzenetben: BC30192A-8DBD-423F-9961-(E-Mail Removed)...
> > Hi All,
> >
> > Is it possible to apply macro on every file in specified folder?
> >
> > Thanks & Regards
> >
> > Hassan

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro apply to all worksheet AskExcel Microsoft Excel Worksheet Functions 3 1st Apr 2009 03:30 PM
Apply Filter Macro Peter La Mont Microsoft Access 2 24th Mar 2009 09:36 PM
Apply Macro To Other Ranges Gerard Sanchez Microsoft Excel Programming 8 23rd Feb 2009 01:11 AM
Apply a macro to only one sheet Marcus Analyst Microsoft Excel Programming 2 3rd Jan 2008 04:28 AM
Apply filter macro Sandra Microsoft Access Macros 5 31st Mar 2004 07:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:48 PM.