+ Reply to Thread
Results 1 to 6 of 6

Making a Hidden App Visible

Hybrid View

  1. #1
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Making a Hidden App Visible

    What do you mean the hidden app can not be made visible?

    To make a hidden app visible, you can type into the immediate window:
    Application.Visible = True
    and hit Enter.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Making a Hidden App Visible

    How did it get invisible.
    In these cases I use:

      with getobject("E:\OF\example.xls")
         
      end with
    Which offers me the opportunity to switch between visible/not-visible whenever I like, because there's always a connection to this workbook.

    In other cases you should use
    workbooks("E:\OF\example.xls").windows(1).visible=true



  3. #3
    Valued Forum Contributor SDruley's Avatar
    Join Date
    04-27-2009
    Location
    Conover, NC
    MS-Off Ver
    Excel 2010 64 bit
    Posts
    415

    Smile Re: Making a Hidden App Visible

    Let me explain better. I have two excel sessions running,,, session A and session B.Session A contains two Workbooks and Session B contains one Workbook. For some reason, at the session level, Session B will become "B.Visible=false", or unavailable. When this happens any code that refers to session B will indicate the the object has not been set. A sample of my declarations is as follows:
    Public xlLINKx As Excel.Application
    Public xlPicasso As Excel.Application
    Public Pcso As Workbook
    Public LinkUP As Workbook
    Public Crystal As Workbook
    Public LKD As Worksheet
    Public IQL As Worksheet
    xlLINKx and its workbook LinkUP and the worksheet LKD become invisible since the session in which they reside becomes invisible.
    The only way to correct this is to reboot.

    The only code I use in the program that refers to the word visible is in the following subroutine:

    Sub Open_xlLINKx(File_name As String, gotosheet As String)
    Application.DisplayAlerts = False
    Set xlLINKx = New Excel.Application
    On Error Resume Next
    xlLINKx.Visible = True 'toggle sessions
    Set LinkUP = xlLINKx.Workbooks.Open(FileName:=File_name, UpdateLinks:=3)
    Application.DisplayAlerts = True
    End Sub
    I just do not understand what is happening.
    Turn Data into Information
    Turn Information into Knowledge
    Turn Knowledge into Direction
    Turn Direction into Leadership
    Turn Leadership into Results
    Stephen Druley

    It's not how quickly you think
    But how deeply you think
    The quality of thinking is measured
    by remoteness to conformance
    Stephen Druley

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Making a Hidden App Visible

    It looks intriguing.
    Why don't you use

    Sub Open_xlLINKx(File_name As String, gotosheet As String)
      with GetObject(File_name)
        .windows(1).visible=true
        .sheets(gotosheet).activate    
      end With
    end sub
    instead of:

    Sub Open_xlLINKx(File_name As String, gotosheet As String)
      Application.DisplayAlerts = False
      Set xlLINKx = New Excel.Application
      On Error Resume Next
      xlLINKx.Visible = True 'toggle sessions
      Set LinkUP = xlLINKx.Workbooks.Open(FileName:=File_name, UpdateLinks:=3)
      Application.DisplayAlerts = True
    End Sub
    Last edited by snb; 06-22-2011 at 09:56 AM.

  5. #5
    Valued Forum Contributor SDruley's Avatar
    Join Date
    04-27-2009
    Location
    Conover, NC
    MS-Off Ver
    Excel 2010 64 bit
    Posts
    415

    Re: Making a Hidden App Visible

    snb,

    I will try this on my next revision... will let you know. I looks like it will improve communications and is a cleaner approach.

    Steve

+ 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