Using OLE Automation On 95 versus NT 
Author Message
 Using OLE Automation On 95 versus NT

I am having a weird problem in VB5 because when I run my program on
Windows 95 it works, and when I do it on NT Workstation
(4.0), it fails miserabe in that a program called Dr. Watson, which
is a debugging program of Visual Basic's comes up on the screen.

Can someone please help me out. I have included my code here:
Thanks, Vipul.

Oh by the way, Microsoft was quite puzzled by this as well.

VERSION 5.00
Begin VB.Form Form1
   Caption         =   "Form1"
   ClientHeight    =   3936
   ClientLeft      =   48
   ClientTop       =   276
   ClientWidth     =   7056
   LinkTopic       =   "Form1"
   ScaleHeight     =   3936
   ScaleWidth      =   7056
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command1
      Caption         =   "Command1"
      Height          =   1332
      Left            =   1080
      TabIndex        =   0
      Top             =   1200
      Width           =   4332
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim myExcel As Excel.Application
Dim wb As Excel.Workbook

Dim ws As Excel.Worksheet

Private Sub Command1_Click()
Set myExcel = CreateObject("Excel.Application")
myExcel.WorkBooks.Open filename:="C:\PROJ1\LOG.XLS"
Set wb = myExcel.ActiveWorkBook
Set ws = wb.Sheets(1)
ws.Range("A5").Value = 99

myExcel.Visible = True
MsgBox "This Worked"

Set myExcel = Nothing
Set ws = Nothing
Set wb = Nothing

End Sub



Fri, 03 Mar 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Help : Remote OLE Automation Problem in 95 and NT 4.0

2. Help : Remote OLE Automation Problem in 95 and NT 4.0

3. Printing Access 95 Reports from VB 4 using OLE Automation

4. Printing Access 95 Reports from VB 4 using OLE Automation

5. VB3 OLE automation to Word 95

6. VB OLE Automation with WordPad in Windows 95

7. JOB: US Visual Basic Developers (2) - VB/MS-Access/Win-NT/Win 95/OLE/MFC

8. Using OLE to control Word from Access (95)

9. Using OLE controls in Excel'95 VB

10. Using OLE controls in Excel'95 VB

11. code to set active printer in access 95 without using Win.ini (Windows NT)

12. If you are using Windows 95 or Windows NT

 

 
Powered by phpBB® Forum Software