View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_5_] Dave Peterson[_5_] is offline
external usenet poster
 
Posts: 1,758
Default Opening item from Listbox... Need Help :P

I think you're going to have to modify each of the routines that the buttons
run.

Dim Wks as worksheet
On Error Resume Next
set wks = Me.Parent.Worksheets(Me.ComboBox1.Value)
on error goto 0

if wks is nothing then
beep
exit sub
end if

Then use wks as the worksheet in your other code.

Wks.printout

Wks.select

Wks.whateveryoudo



jaysen wrote:

Dave-

Appreciate the help... really - I do. I might have my terminology
mixed up. When I refer to 'worksheet' I am referring to the sheets in
the workbook (tabs at the bottom). My understanding of workbook is
each *.xls file - a workbook. I hope I'm correct.

Let me try explainging myself again;
(see screenshot for update)
I have a workbook with 70+ sheets (aka accounts)...
Instead of having to scroll with the tabs at the bottom to access each
sheet/account, I would like to have a listbox setup (see picture) so I
can select the 'account', use the command buttons at the right to
either; OPEN, PRINT, ETC... Before I try getting the other Macros to
work I really would like the Open - command to function properly.

EDIT: WHen I refer to "OPEN" I mean change the current sheet
(screenshot which is known as the main sheet) to the new selected
sheet/account

Hopefully I've clarified enough... THanks!

http://www.digital8ball.net/excel.jpg

--
jaysen
------------------------------------------------------------------------
jaysen's Profile: http://www.excelforum.com/member.php...o&userid=24120
View this thread: http://www.excelforum.com/showthread...hreadid=380698


--

Dave Peterson