Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old September 6th, 2008, 08:11 AM
Newbie
 
Join Date: Sep 2008
Posts: 1
Default 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
Reply
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles