Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
listing which documents were changed by macro
I have a macro which goes through hundreds of documents
and changes old product names to new product names. This uses Excel's find and replace functions. After the macro is finished, I would like to have a list of which documents were changed and which were not. I have to redistribute hard copies of the documents that were changed, so I don't want to worry about the documents that were not changed. Is there a way to know whether a find/replace search for a document made any changes or not? Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
listing which documents were changed by macro
As the macro goes through the workbooks, you should keep a list of workbooks
which have changed (in my example, the list is on a new worksheet in the active workbook). You will know that a workbook has changed when its Saved property is False. For example: Dim ws As Worksheet, wb As Workbook Set ws = Worksheets.Add For Each Workbook In Workbooks If Not wb.Saved then ws.Range("A" & Rows.Count).End(xlUp).Offset(1) = wb.Name End If Next Hard to be more specific without knowing more about your code. -- Vasant "alan" wrote in message ... I have a macro which goes through hundreds of documents and changes old product names to new product names. This uses Excel's find and replace functions. After the macro is finished, I would like to have a list of which documents were changed and which were not. I have to redistribute hard copies of the documents that were changed, so I don't want to worry about the documents that were not changed. Is there a way to know whether a find/replace search for a document made any changes or not? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro in worksheet with changed name | Excel Discussion (Misc queries) | |||
Listing multiple values in a macro | Excel Worksheet Functions | |||
Listing of excel files in My Documents | Excel Discussion (Misc queries) | |||
Macro name listing | Excel Programming |