
CreateObject("Excel.Application") Fails on NT
I work with NT machine at work and have written programs that control Excel
from VB. Here is the code that I use:
Set xlApp = Excel.Application 'Opens Excel if not open already
xlApp.Visible = True 'Makes it visible
Set xlBook = xlApp.Workbooks.Add 'Adds a workbook
xlApp.ActiveWindow.WindowState = xlMaximized 'Maximizes workbook
Quote:
> Greetings,
> I am trying to create an Excel document from within VB 6.0 on NT 4.0.
> I have declared
> Dim objExcel As Object
> in a module. I then try to run excel but the subroutine fails when it
> gets to
> SET line. I have used this statement on a Win 98 machine, but it fails
> on my NT machine. Any ideas?
> David
> Private Sub cmdGR4OMLLS_Click()
> Dim slabels(1 To 4) As String
> Dim dData(1 To 3, 1 To 4) As Double
> Dim icnt1, icnt2, icount As Integer
> Set objExcel = CreateObject("Excel.Application")