Focus sheet

  • Thread starter Thread starter Max Potters
  • Start date Start date
M

Max Potters

Hi,

I have a little piece of code which selects another sheet, but while doing
this the focus on the sheet disappears, i.e. the blue bar you see on top of
Excel turns into vague blue, while normally this is deep blue. I tried to
use the .Select and .Activate statement, but none of these work.

I must say that I use a userform to let someone type in a password, and when
it's correct, it selects the othersheet (userform hides using the .Hide). I
don't know if this has anything to do with it, but I would like your help.

Thanks
Max
 
Hi max

Try to use this after the .Hide
AppActivate Application.Caption
 
do you have

application.ScreenUpdating = False

in your code.

This might be the source of the problem if you do. Try setting it to true.
 
I tried both of your comments, but it still doesn't help. Do you have
another solution?

Btw, if i go from sheet1 to sheet2 (this happens without a userform) the bar
is deep blue, so the focus is ok.

Max
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top