Results 1 to 5 of 5

Thread: Holding Front Page

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2001
    Location
    Birmingham UK/Basingstoke
    Posts
    17

    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

  2. #2
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    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 !

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2001
    Location
    Birmingham UK/Basingstoke
    Posts
    17

    Re: Holding Front Page

    Hi,

    Thanks however neither

    objExcel.visible=false
    or
    objWord.visible=false

    seem to work

    Kev

  4. #4
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    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 !

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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
  •  



Click Here to Expand Forum to Full Width