|
-
Feb 10th, 2005, 10:27 AM
#1
Thread Starter
Junior Member
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
-
Feb 10th, 2005, 10:35 AM
#2
Frenzied Member
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 !
-
Feb 10th, 2005, 11:22 AM
#3
Thread Starter
Junior Member
Re: Holding Front Page
Hi,
Thanks however neither
objExcel.visible=false
or
objWord.visible=false
seem to work
Kev
-
Feb 10th, 2005, 11:32 AM
#4
Frenzied Member
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 !
-
Feb 10th, 2005, 12:42 PM
#5
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|