Thread: LisBox List
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default LisBox List

you can refer to sheet2 with

Worksheets("Sheet2").Range("A1:A100")

for example. This does not activate sheet 2.

Avoid code like

Sheet2.Activate
or
Worksheets("Sheet2").Activate
Range("A1:A100").Select

Or if you can't avoid that, then

Application.ScreenUpdating = false
' recorder style code here
Worksheets("Sheet2").Select
' more code
Worksheets("Sheet1").Select
Application.ScreenUpdating = True

--
Regards,
Tom Ogilvy

"Abdul" wrote in message
...
Hi,


I am using a user form with a combobox and list box to
get certain specific data.

Suppose that I am activating the user form from sheet1
and my data in sheet2 what i am doing is..

When i select an item from combobox1 all data related to
that item is listed in listbox1.

in that process my sheet2 is activated and alldata in it
can be seen.

is it possible to do this without activating sheet2?

From sheet1 the userfom is activated and based on
combobox1 value items listed in listbox from sheet2.

thanks in advance

Abdul