Thread: Listbox in VBA
View Single Post
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

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/groups?thre...1C74%40msn.com

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

Jeff wrote:

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,


--

Dave Peterson