Group worksheets
I'm not too sure what you are trying to do with this code but perhaps this???
With MyBook
Sheets(array(Sheet13.name, Sheet14.name, Sheet15.name, Sheet16.name, _
Sheet17.name, Sheet18.name, Sheet19.name, Sheet20.name, Sheet21.name, _
Sheet22.name, Sheet23.name, Sheet24.name)).Select
sheet13.Activate
Call UpdateVlookup
Sheet1.Activate
Sheet16.Activate
ActiveWorkbook.Save
ActiveWorkbook.Close
End With
--
HTH...
Jim Thomlinson
"Fred" wrote:
Hi
I'm trying to group worksheets, and not having much luck. I have tried this
with and without arrays. I am using the sheet code names, not the tab names,
and this is when I started having problems. The tab names worked until
different tab names occured. Where am I going wrong?
With MyBook
Sheets(array("Sheet13", "Sheet14", "Sheet15", "Sheet16", "Sheet17",
"Sheet18", "Sheet19", "Sheet20", "Sheet21", "Sheet22", "Sheet23",
"Sheet24")).Select
Sheets("sheet13").Activate
Call UpdateVlookup
Sheets("Sheet1").Activate
Sheets("Sheet16").Activate
ActiveWorkbook.Save
ActiveWorkbook.Close
End With
Thanks for your help
Fred
|