Is the 200 workbooks the ONLY files in the folder C:\EBACKUP ?

If so, you can place this macro in a "standard" module of your master workbook:


Sub CopyData()
    Dim fso, Fldr, fl, fc, f
    Dim Sht
    Sht = "Option Letter"
    Fldr = "C:\EBACKUP\"
    Application.ScreenUpdating = False
    Set fso = CreateObject("Scripting.FileSystemObject")
    
    Set fl = fso.getfolder(Fldr)
    Set fc = fl.Files
    For Each f In fc
        Workbooks.Open f.Path
        Sheets(Sht).Unprotect
        Workbooks(f.Name).Sheets(Sht).Range("B131").Value = 
ThisWorkbook.Sheets(Sht).Range("B131").Value
        Workbooks(f.Name).Sheets(Sht).Range("B202").Value = 
ThisWorkbook.Sheets(Sht).Range("B202").Value
        Workbooks(f.Name).Sheets(Sht).Range("B319").Value = 
ThisWorkbook.Sheets(Sht).Range("B319").Value
        Workbooks(f.Name).Sheets(Sht).Range("B424").Value = 
ThisWorkbook.Sheets(Sht).Range("B424").Value
        Sheets(Sht).Protect
        Workbooks(f.Name).Close savechanges:=True
    Next f
    Application.ScreenUpdating = True
    MsgBox "Finished"
End Sub

If you need to skip specific files, then we're have to modify it somewhat.

 
Paul
-----------------------------------------
“Do all the good you can,
By all the means you can,
In all the ways you can,
In all the places you can,
At all the times you can,
To all the people you can,
As long as ever you can.” - John Wesley
-----------------------------------------




________________________________
From: Mel <mel.pilg...@agr.gc.ca>
To: excel-macros@googlegroups.com
Sent: Wed, October 31, 2012 12:49:58 PM
Subject: $$Excel-Macros$$ Need help to create VBA to copy 4 cells from one 
spreadsheet to over 200 spreadsheats in same folder


I have a master spreadsheet with 5 tabs.   On my master sheet (called Master) - 
on the tab called 'Option Letter' I need to copy cells B131, B202, B319, B424 
to 
the same
tab (same name on each sheet 'Option Letter') on over 200 spreadsheets.  I will 
need to unprotect the Option Letter tab (no password), paste in the info from 
my 
Master sheet Option letter tab (master sheet is called master), 

then protect (no password) and save the spreadsheet with the same name.  Each 
spreadsheet is in the same folder called C:\EBACKUP.  Each spreadsheet has a 
different name.

I will only need to run this process once to update all spreadsheets with the 
new info for these 4 cells.    I tried a number of different VBA to loop 
through 
each spreadsheet but keep getting a number of error.
Any help is appreciated.
thx

Mel-- 
Join official facebook page of this forum @ 
https://www.facebook.com/discussexcel
 
FORUM RULES (1120+ members already BANNED for violation)
 
1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
 
2) Don't post a question in the thread of another member.
 
3) Don't post questions regarding breaking or bypassing any security measure.
 
4) Acknowledge the responses you receive, good or bad.
 
5) Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

 
6) Jobs posting is not allowed.
 
7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.
 
NOTE : Don't ever post personal or confidential data in a workbook. Forum 
owners 
and members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.

-- 
Join official facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES (1120+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

6) Jobs posting is not allowed.

7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.


Reply via email to