Spreadsheet Embedding in a Visual Basic Program
Click here to download a zip file of the form and project files

Code for the OLE Excel/Spell Check Program
Click here to download a zip file of the form and project files

Private Sub Command1_Click()
Dim x As Object
Set x = CreateObject("excel.sheet")
x.Application.Cells(1, 1).Value = Text1.Text 'copy text from text
box
x.Application.Visible = False
If x.Application.CheckSpelling(x.Application.Cells(1, 1)) Then
MsgBox (x.Application.Cells(1, 1) + " is spelled
correctly")
Else
MsgBox (x.Application.Cells(1, 1) + " is NOT spelled
correctly")
End If
Text1.Text = x.Application.Cells(1, 1).Value
x.Application.Quit
Set x = Nothing 'releases the sheet resources
End Sub
Last updated by BD on 02/18/09