Hi, I'm new to vba and have mainly been learning by recording.
I currently have a book with 50 named sheets and need to delete info from about 30 of them. I currently have a macro to do this using a select array "sheet 1", "sheet 4"... Etc. I'd rather have this as a list of sheet names on a control sheet so that can be update by other people rather than them going into the code but I can't get it working.
In using:
Dim arrayworksheets As Variant
Arrayworksheets = sheets("control").range("c4:c:100")
Sheets(array(arrayworksheets)).select
...and then just range and clear contents but I get a type mismatch error
I currently have a book with 50 named sheets and need to delete info from about 30 of them. I currently have a macro to do this using a select array "sheet 1", "sheet 4"... Etc. I'd rather have this as a list of sheet names on a control sheet so that can be update by other people rather than them going into the code but I can't get it working.
In using:
Dim arrayworksheets As Variant
Arrayworksheets = sheets("control").range("c4:c:100")
Sheets(array(arrayworksheets)).select
...and then just range and clear contents but I get a type mismatch error