Flashing worksheets behind a userform

M

mworth01

I have a database that I would like to remain invisible to the user. I
have set up several user forms that allow the user to input new data,
search, modify and delete existing data. As the user jumps back and
forth between user forms, the screen flashes in the background.
Application.ScreenUpdating = False did not cure this problem.

In addition, when the user selects a name from a drop down box in the
form, the database jumps to that row in the background. As I stated
before, I don't want the user to even see the database. But if I try
to hide that worksheet (using Format, Sheet, Hide), then my user form
crashes when I try to call it. Any ideas on either of these problems?
Thanks in advance.
 
K

kkknie

One quick fix might be to change the font color to the same as th
background color. The worksheet would be there, but the data would no
be seen. Use this in place of application.screenupdating.
 
D

dude!

If you are using select or activate in your code then
worksheet will need to be visible - switching between
worksheets can cause screen flashing even when using
Application.screenupdating = false.
Way to address this is to amend your code to reference
the worksheet & cell location you want to place the data.
eg
sub mydatatest
mydata ="This Is A Test"
worksheets(1).cells(2,10).value = mydata
end sub
Above will place data in sheet 1 row 2 col 10 regardless
of which sheet is the active sheet.

Hope helpful
 
T

TheDuck

The answer from dude! is a good one but if you don't want to go down
that path you could always just hide Excel. As you're running lots of
userforms, then


Code:
--------------------
Application.Visible = False
--------------------


into the Workbook_Open sub would hide the instance of Excel.

Just a thought.

Geoff (TheDuck)
 
M

mworth01

Thanks for the replies. All three of these options look like they'll
work (obviously, else you probably wouldn't have posted!). I ended up
going with hiding the application as that was a request from the user
to begin with. Works great. Thanks again for your help.
 
M

mworth01

Thanks for the replies. All three of these options look like they'll
work (obviously, else you probably wouldn't have posted!). I ended up
going with hiding the application as that was a request from the user
to begin with. Works great. Thanks again for your help.
 
Top