Activating / Closing workbook using part name and a wild character
Dim bk as Workbook
for each bk in application.Workbooks
if bk.Name like "New*" then
bk.Activate
exit for
end if
Next
--
Regards,
Tom Ogilvy
"sharman" wrote in message
...
Hi,
Is it possible to activate/close an open workbook by a macro by using
just
the part name alongwith with a wild character? Like if the workbook name
is
"NewBook_6_10" and I want to activate/close it by just using "New*". I
tried using it but I get an error message. Thanks in advance.
|