milkncookiez
New Member
- Joined
- Aug 16, 2013
- Messages
- 2
How can I make this code
<code style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;">For Each wb In wbC
If InStr(wb.BuiltinDocumentProperties("keywords").value(), "MyApplicationSet") = 0 Then
On Error Resume Next
End If
Call OverTimeSave(wb)
Next
</code>
so when the current workbook is not part of the system - it skips that one workbook (without saving it) and iterates to the next workbook? Is that code correct, because I am not sure the <code style="margin: 0px; padding: 1px 5px; border: 0px; vertical-align: baseline; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;">On Error Resume Next</code> will do the work here, as I read, it will just go to the next statement, which means it will call the save function on the particular workbook, which is not part of my system.
I want it like: if there's error - do nothing and iterate to the next workbook.
<code style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;">For Each wb In wbC
If InStr(wb.BuiltinDocumentProperties("keywords").value(), "MyApplicationSet") = 0 Then
On Error Resume Next
End If
Call OverTimeSave(wb)
Next
</code>
so when the current workbook is not part of the system - it skips that one workbook (without saving it) and iterates to the next workbook? Is that code correct, because I am not sure the <code style="margin: 0px; padding: 1px 5px; border: 0px; vertical-align: baseline; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;">On Error Resume Next</code> will do the work here, as I read, it will just go to the next statement, which means it will call the save function on the particular workbook, which is not part of my system.
I want it like: if there's error - do nothing and iterate to the next workbook.