Range names vs Sheet name
I think yo need a unique number to indentify each item. It doesn't need to
be the sheet name but some number on each sheet the uniquely identifies each
item. I wouldn't reliy on the sheet name which is manually changed to
identify each item. Yo could place the number in cell A1 on each sheet or
some specific cell(s).
You can seach eavery sheet ofr the item with a simple loop
FindItem = "abc"
SheetName = ""
for each sht in sheets
if sht.Range("A1") = FindItem then
SheetName = sht.name
exit for
end if
next sht
if SheetName = "" then
msgbox("Could Not find Item : " & FindItem)
else
'enter You code here
end if
"Hennie Neuhoff" wrote:
I'm suppliying various branches a standard workbook for stock control.
Currently the sheets are name Stock1, Stock2 etc to Stock150. The user will
be able to change the sheetname to a more descriptive name (stockitem name).
A macro will sort the sheet names in alphabetically order which will be
easier to select from in a userform. My problem is to perform the stock
issues/received on the specific stock item [the same macro for all activity].
I battle to get this working. I know that I should use range names - but I'm
lost!!
--
HJN
|