+ Reply to Thread
Results 1 to 9 of 9

Command to make Excel open invisible?

  1. #1
    Registered User
    Join Date
    06-18-2008
    Posts
    32

    Command to make Excel open invisible?

    Is there a command to put in a link to an excel file to open up the file completely invisible? Right now I am using the Application.Visible = False command on the second line of my macro module, but I don't like how everything pops up then disappears. Is there a better way I can be doing this?

    Hope you can help,

    Eric

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Eric,

    From your post I am not sure what you are doing. Are you hiding the instance of Excel that the macro is running in, or hiding another instance of Excel the macro is opening?

    If you are starting a new instance of Excel and want to hide it then do so by using late binding. If you are trying to do this when the workbook opens, you won't be able to stop Excel from showing at some point for a brief time.

    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    06-18-2008
    Posts
    32
    Here is what I have. I have a button in our automation software that when pressed, opens up excel, crunches some numbers, then saves the file to a thumbdrive and archives it on the computer. I would just like it to look like nothing really happened, but I always see Excel pop-up and was wondering if there was a way to get that instance of Excel to be invisible.

    I hope I made that clear enough.

    -Eric

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Eric,

    You will need to start Excel using late binding, i.e. creating an instance of Excel at run time. This will allow you to control whether Excel is visible to the user. It would be helpful to see the code you are using now, but is a an example...
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  5. #5
    Registered User
    Join Date
    06-18-2008
    Posts
    32
    Here is what I have in my first Module. Sorry for the size, but wasn't sure what all you wanted/needed to see.

    Please Login or Register  to view this content.

    I chopped ou quite a bit under Import() to make it fit
    Last edited by ebahr; 06-20-2008 at 02:59 PM.

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello ebahr,

    Because you are loading the workbook the macro is in, you won't be able to suppress Excel until Excel has been loaded. Can you give me a brief description of what is taking place?

    Thanks,
    Leith Ross

  7. #7
    Registered User
    Join Date
    06-18-2008
    Posts
    32
    Well I am not sure much goes on more than what you said. Excel workbook opens up with graphs and charts and stuff, then Auto_Open() does its magic. To be honest with you, I am not entirely sure how alot of it works. I was just given this project with all this stuff done and I am suppose to change it and make it better.

    So is there not a command to use in, say a short cut, where you can make things hidden.

    ie

    Target: C:\program files\office\excel.exe -hidden or -invisible or some magical command like that

    ?

    If I am stuck with what I have now I would not be unhappy, I was just looking for a quick and easy way to do it. If its too much trouble I am not going to bother.

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello ebahr,

    If you post the entire workbook then I can give you a better answer about what can be done. The maximum file size is 100 kb. Be sure to remove any confidentail information before you post the workbook. If it is to large to post, you can email me a copy at LeithRoss@gmail.com

    Sincerely,
    Leith Ross

  9. #9
    Registered User
    Join Date
    06-18-2008
    Posts
    32
    Well, I found a way to make it open minimized, so I no longer need it to open it invisible. Thanks for your help though.

    -Eric

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1