Greetings,
This is turning out to be more of a challenge than I had anticipated. I am trying to define a name for a workbook that has a name that wont necessarily be the same for each time the macro is run. Below is the code as it sits currently...
The purpose of the macro is to run through customer workbooks to copy and paste cells into the accounting workbooks while other workbooks are open (products.xls).
However, the structure and names of the worksheets within the workbooks(with different names) is the same. I am currently receiving an error on this line.
any suggestions on syntax would be appreciated
This is turning out to be more of a challenge than I had anticipated. I am trying to define a name for a workbook that has a name that wont necessarily be the same for each time the macro is run. Below is the code as it sits currently...
Code:
Dim wb As WorkbookFor Each wb In Application.Workbooks
If wb.Name <> "Products.xls" Or "General_Account_Ledger.xls" Or "PERSONAL.xls" Then
wb.Sheets("Customer Funds Received").Range("B10").Copy
wb.Sheets("Customer Ledger").Range("A3").Select
The purpose of the macro is to run through customer workbooks to copy and paste cells into the accounting workbooks while other workbooks are open (products.xls).
However, the structure and names of the worksheets within the workbooks(with different names) is the same. I am currently receiving an error on this line.
Code:
If wb.Name <> "products.xls" Or "General_Account_Ledger.xls" Or "PERSONAL.xls" Then
any suggestions on syntax would be appreciated
Last edited: