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:
xlLINKx and its workbook LinkUP and the worksheet LKD become invisible since the session in which they reside becomes invisible.![]()
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
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:
I just do not understand what is happening.![]()
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
Bookmarks