-
Holding Front Page
I have several macros that work very well for what they are intended to do, but they look messy as the user can see all the various actions being perfromed. i.e. in excel they see cutting and pasting or new sheets being added. It's not a major concern and in some cases is a bonus as the team who work for me are impressed by what the sheets are doing, but in other cases, it's either inappropriate or looks less professional. If it's a quick fix, then if someone would be good enough to help me.
Thanks
Kevin :bigyello:
-
Re: Holding Front Page
set the "visible" proprty of your excel object to false
e.g. objExcel.Visible = false
Remember to set it to true at the end of your code though, so the user gets to see the end result !
-
Re: Holding Front Page
Hi,
Thanks however neither
objExcel.visible=false
or
objWord.visible=false
seem to work
Kev
-
Re: Holding Front Page
I was assuming that you are doing this in Excel (via VB), and "objExcel" is what I always call my Excel object, so apologies for the confusion.
If you are writing the macro in VBA (within Excel) then try :
Application.Visible = False
Again .... remember to set it to true at the end.
I've never actually used this property within Excel, I always do it via VB, so I'm not entirely sure what would happen !
-
Re: Holding Front Page
Setting the visibility property of Excel to False would create issues for your code if you have
code that makes selections/copies/pastes. Could you post some code and we can try to optimize it one procedure
at a time.
There are things we can do like referencing a cell and setting a variable equal to the cells value and then reference
another cell in another sheet or book and set its value equalt to the variable. This would be the "professional" way
to do it rather then a copy/paste.
Also, a copy and paste would fail if the user accidentally hits keys or other interaction while
the macro is running.