Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem referring to another workbooks column

Status
Not open for further replies.

atray04

Programmer
Dec 29, 2003
112
US
This is actually in reference to some code that xlbo posted earlier. He used this line: For Each c In [Files]
now if the column Files is in a different work book how would I change that? I thought that maybe you could just say wb.Files or maybe activate that workbook and then search the files. Any help would be great thanxs
 
Hi atray04,

If the other workbook is open and called, say, OtherBook.xls, then you should be able to use For Each c In [OtherBook.xls!Files]

Enjoy,
Tony

------------------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading FAQ222-2244 before you ask a question.
 
hmmm i tried: For Each c In [FINAL-masterdummy(writable).xls!Files] and i got a type mismatch error
 
Hi atray04,

If your workbook name contains spaces you need to wrap it in quotes ..

Code:
For Each c In [
Code:
'
Code:
FINAL-masterdummy(writable).xls
Code:
'
Code:
!Files]

Enjoy,
Tony

------------------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading FAQ222-2244 before you ask a question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top