Listbox in VBA

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

Guest

Hello,

I have this VBA macro:
fname = Application.GetOpenFilename
Workbooks.Open Filename:=fname
Set wb = Workbooks.Open(Filename:=fname)
I'd like to know whether it is possible with VBA to display all the
worksheets in workbook "fname" with a listbox in order to be able to click on
the worksheet that I want to activate ?
Regards,
 
I'm not sure I'd go to all that trouble.

Maybe you could just rightclick on the VCR like controls to the left of the
sheet tabs. You can select your worksheet from there.

If you like the idea of using an table of contents worksheet and selecting a
sheet there, you can find some code at David McRitchie's site:
http://www.mvps.org/dmcritchie/excel/buildtoc.htm

And if you wanted a floating toolbar that can show you the names of worksheets
to select:
http://groups.google.com/[email protected]

If you're new to macros, you may want to read David's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 

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

Similar Threads

Worksheet.activate 1
Activating Workbooks 2
Open files from List 9
Out of Range 5
Sub out of range 1
Workbook.activate 1
VBA Formula Help 6
Copy Cells 2

Back
Top