help regarding open office calc and vb
while executing the following code i am getting error message as "methods and variable not defined and also " com.sun.star.uno.runtime exception"
Change the code for me as per request. OOCALCVB.dll file is added in the references
Private Sub cmdGen_Click()
MsgBox "Don't Forget To Set The Print Area of The Excel Sheet " & vbCrLf & "Press Ok To Generate The Excel Sheet", vbCritical + vbOKOnly, gstrModuleName
lblProcessing.Visible = True
Dim objExcel As OOCALCVB.Calc
Dim lincolno As Long
Dim XLSheet As Object
Set objExcel = New OOCALCVB.Calc
objExcel.Workbooks.Add
'''''Populating Trial date Heading
objExcel.Cells(1, 1) = "MALDA DISTRICT CENTRAL COPERATIVE BANK LTD"
objExcel.Cells(2, 1) = "Head Office : Saraju Prasad "
objExcel.Cells.Font.Bold = True
objExcel.Range(objExcel.Cells(1, 1), objExcel.Cells(1, 7)).VerticalAlignment = xlBottom
objExcel.Range(objExcel.Cells(1, 1), objExcel.Cells(1, 7)).VerticalAlignment = xlBottom
objExcel.Range(objExcel.Cells(1, 1), objExcel.Cells(1, 7)).WrapText = False
objExcel.Range(objExcel.Cells(1, 1), objExcel.Cells(1, 7)).Orientation = 0
objExcel.Range(objExcel.Cells(1, 1), objExcel.Cells(1, 7)).AddIndent = False
objExcel.Range(objExcel.Cells(1, 1), objExcel.Cells(1, 7)).ShrinkToFit = False
objExcel.Range(objExcel.Cells(1, 1), objExcel.Cells(1, 7)).MergeCells = True
objExcel.Range(objExcel.Cells(2, 1), objExcel.Cells(2, 7)).HorizontalAlignment = xlcenter
objExcel.Range(objExcel.Cells(2, 1), objExcel.Cells(2, 7)).VerticalAlignment = xlBottom
objExcel.Range(objExcel.Cells(2, 1), objExcel.Cells(2, 7)).WrapText = False
objExcel.Range(objExcel.Cells(2, 1), objExcel.Cells(2, 7)).Orientation = 0
objExcel.Range(objExcel.Cells(2, 1), objExcel.Cells(2, 7)).AddIndent = False
objExcel.Range(objExcel.Cells(2, 1), objExcel.Cells(2, 7)).ShrinkToFit = False
objExcel.Range(objExcel.Cells(2, 1), objExcel.Cells(2, 7)).MergeCells = True
objExcel.Cells(4, 1) = "Statement of accounts for the period from " & mskFromDt.Text & " to " & mskToDt.Text
|