Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

application.screenupdaing=false 1

Status
Not open for further replies.

sunnytahir

Programmer
May 11, 2003
32
Dear Sirs,

i use an excel vba form (userform). when a command button on userform is clicked it selects a worksheet and then display a second userform. i use
application.screenupdaing=false before the sheet selection. But it displays the sheet first and then second userform is shown.

Thanks in advance.
Tahir
 
Do you REALLY need to select the sheet ??

What in the code needs the sheet to actually be selected ??

Rgds, Geoff

Never test the depth of water with both feet

Help us to help you by reading FAQ222-2244 before you ask a question
 
Dear Geoff,

i have three command buttons on the userform1. Userform2 contains some textboxes.
when the first button is clicked on userform1 then the sheet1 is selected and userform2
gets data from sheet1.
when the second button is clicked on userform1 then the sheet2 is selected and userform2
gets data from sheet2. and so on.

I use screenupdating=false before the sheet selection.

is there another way to do this.

thanks for your time.
Tahir
 
Yes but why do you need to select a sheet to get data from it ?? My point is that sheet selection ias very rarely necessary and generally only needs to be used for visual purposes - if you are getting flicker whilst selecting a sheet, maybe thye easiest option is to simply not select the sheet and just reference it in code eg:

on the button click

Code:
Set SheetToUse = sheets("Sheet1")

with SheetToUse
     textbox1.text = .range("A1")
end with

no need to select the sheet at all.....may be worth thinking about

Rgds, Geoff

Never test the depth of water with both feet

Help us to help you by reading FAQ222-2244 before you ask a question
 
Dear Geoff,

Thanks for your suggestion.

regards.
Tahir
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top