Loading chosen Sheets into an array

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a macro which loads sheet names into an array called SheetArray. The
loading portion of the macro is manual as seen below. I want to set this up
so that the user is prompted with a userform with a list of available sheets
in the workbook. The user can the pick the desired sheets (check box or
whatever) and then the # of chose sheets will then make their way Dim stmt
below and the actuall sheets themselves will make their way into the array
below through some sort of loop. Any ideas how to do this.

Dim SheetArray(0 To 3)

SheetArray(0) = Sheet3.Name
SheetArray(1) = Sheet5.Name
SheetArray(2) = Sheet6.Name
SheetArray(3) = Sheet17.Name

Thanks

EM
 
As long as you recognize that that doesn't use a Userform. It uses a
dialogsheet. The controls are from the forms toolbar.
 
Yes I know that Tom. That is why I was trying to avoid it in the first
place. But decided due to time pressure that it would suffice.

EM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top