Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Apply macro
Hi All,
Is it possible to apply macro on every file in specified folder? Thanks & Regards Hassan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Apply macro
Yes it is.
"Hassan" az alábbiakat Ã*rta a következÅ‘ hÃ*rüzenetben: ... Hi All, Is it possible to apply macro on every file in specified folder? Thanks & Regards Hassan |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Apply macro
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" az alábbiakat Ã*rta a következÅ‘ hÃ*rüzenetben: ... Hi All, Is it possible to apply macro on every file in specified folder? Thanks & Regards Hassan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro apply to all worksheet | Excel Worksheet Functions | |||
Apply Macro to all worksheets in a workbook except one | Excel Discussion (Misc queries) | |||
Apply macro to one sheet only | Excel Discussion (Misc queries) | |||
Apply a Macro to a FunctionKey... | Excel Programming | |||
Macro or VB to apply filter in spreadsheet | Excel Programming |