adamdynamic
New Member
- Joined
- Dec 12, 2011
- Messages
- 42
Hi,
I've scoured the internet looking for a solution for this, I'm hoping someone here can help me?
I am writing a macro that allows users to protect multiple sheets at once (rather than protecting them one at a time). For the current macro to work I need to pass it an array of worksheet names e.g. ("Sheet1","Sheet2","Sheet3") which the macro then iterates through.
Is there a way to generate an array of sheet names like this based on the sheets that the user had selected immediately prior to running the code? The names and number of tabs selected will vary, if anyone can suggest a way to do this (or alternatively, a better way to approach the problem) that would be enormously appreciated!
If more information would be useful, please let me know!
Thanks,
Adam
I've scoured the internet looking for a solution for this, I'm hoping someone here can help me?
I am writing a macro that allows users to protect multiple sheets at once (rather than protecting them one at a time). For the current macro to work I need to pass it an array of worksheet names e.g. ("Sheet1","Sheet2","Sheet3") which the macro then iterates through.
Is there a way to generate an array of sheet names like this based on the sheets that the user had selected immediately prior to running the code? The names and number of tabs selected will vary, if anyone can suggest a way to do this (or alternatively, a better way to approach the problem) that would be enormously appreciated!
If more information would be useful, please let me know!
Thanks,
Adam