Run Code in Another Workbook
Sam - this helps. Thank you - Bob
"Sam Wilson" wrote:
The following looks for an open workbook called test.xls, finds a sheet
called "Sheet1" in it and colours cell A1 light blue. It can be placed in any
other workbook & will still work:
Sub demo()
dim wb as workbook
set wb = workbooks("test.xls")
dim ws as worksheet
set ws = wb.worksheets("Sheet1")
ws.range("A1").interior.colorindex = 37
end sub
You can use activeworkbook etc rather than setting wb to a pre-named
workbook etc.
Sam
"Bob Barnes" wrote:
Looking for automation code to have in a "Template" Workbook
that will run code in an Excel File received from Management.
This code would make a DBF from the Excel File received from Management.
TIA - Bob
|