#1   Report Post  
Jeff
 
Posts: n/a
Default Listbox in VBA

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,

  #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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ListBox (maybe?) ... If so, how? Ken Excel Discussion (Misc queries) 3 December 15th 04 10:16 PM


All times are GMT +1. The time now is 09:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"