Ok.
'declare a worksheet variable
dim wks as worksheet
'start with the other workbook
with workbooks("Filename.xls")
'if you want to select, that workbook has to active
.activate
'loop through all the worksheets in that filename.xls workbook
for each wks in .worksheets
'if the codename--the name you see in the project explorer
'Sheet1(nameuserseesontab)
if lcase(wks.codename) = "sheet1" then
'is equal to sheet1, we found it, so select it
wks.select
'and get out
exit for
end if
next wks
end with
But maybe I misunderstood what "system label" meant.
Sorry Dave, I just can't get it to work. Had a few days break to see if a
fresh start helps but no deal. I have a heap of code that does work, I just
can't get it to open the appropriate worksheet to work on!
It should be simple ... can you comment your code for me so I can see why it
isn't doing what I want it to do?
two workbooks
workbook1 has valueIwantTo Find In Workbook2
workbook2 has n sheets, match will be in one of them
need to open wkbk2 and run search routine (which works fine)
Sorry to be a pain