home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Programmer's Journal Buyer's Guide / Visual_Basic_Programmers_Journal_Buyers_Guide_CD-ROM_1994.iso / vbitsdm2 / vbaxtra / startomb / startomb.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-03-17  |  1.3 KB  |  46 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "StartOMB"
  4.    ClientHeight    =   2190
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1485
  7.    ClientWidth     =   2850
  8.    Height          =   2595
  9.    Icon            =   STARTOMB.FRX:0000
  10.    Left            =   1035
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    ScaleHeight     =   2190
  14.    ScaleWidth      =   2850
  15.    Top             =   1140
  16.    Width           =   2970
  17. Sub Form_Load ()
  18. Me.Caption = "Launch:" + Chr$(160) + "Object Model Browser"
  19. Me.Left = -Me.Width
  20. End Sub
  21. Sub Form_Resize ()
  22. If Me.WindowState <> 1 Then
  23.   Me.WindowState = 1
  24.   Me.Refresh
  25.   Main
  26. End If
  27. End Sub
  28. Sub Form_Unload (Cancel As Integer)
  29. On Error Resume Next
  30. If XLSheet Is Nothing Then  'We started Excel
  31.     'If no one else is using this Excel instance, close it
  32.     Debug.Print XLAddin.Installed  'Error if workbook
  33.     If Err Then
  34.         XLAddin.RunAutoMacros 2 'xlAutoClose, workbook in XLAddin
  35.         XLAddin.[Close] False
  36.         If XLApp.Workbooks.Count = 0 Then XLApp.Quit
  37.     Else
  38.         If XLApp.Workbooks.Count = 1 Then 'Hidden data sheet only
  39.             XLApp.Workbooks(XLAddin.Name).RunAutoMacros 2 'xlAutoClose, must go through Workbooks collection
  40.             XLApp.Quit
  41.         End If
  42.     End If
  43.     Set XLApp = Nothing
  44. End If
  45. End Sub
  46.