2 Replies - 6311 Views - Last Post: 27 April 2010 - 12:23 AM Rate Topic: -----

#1 srbatcha  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 20-March 09

excel report from vb6.0

Posted 26 April 2010 - 07:59 AM

i am doing excel report through vb6.0 coding. but report very slow
my coding below:

rec1.OPEN "SELECT Division, Sales_document, Sold_to_party, Sales_employee, min(MMonth), sum(Order_Val) From openorder GROUP BY Division, Sales_document, Sold_to_party, Sales_employee", con, adOpenKeyset, adLockOptimistic

If rec1.RecordCount > 0 Then
rec1.MoveFirst
wk2.Visible = True

j = 2
While Not rec1.EOF
With objsheet

.Cells(j, 1) = rec1(0)
.Cells(j, 2) = rec1(1)
.Cells(j, 3) = rec1(2)
.Cells(j, 4) = rec1(3)
.Cells(j, 5) = rec1(4)
.Cells(j, 6) = rec1(5)

End With
j = j + 1
rec1.MoveNext
Wend
Else
MsgBox "Record not found or Cancelled", vbInformation
End If

how to speed up in my report?
please help me

Is This A Good Question/Topic? 0
  • +

Replies To: excel report from vb6.0

#2 Guest_evry1falls*


Reputation:

Re: excel report from vb6.0

Posted 26 April 2010 - 10:47 AM

what do u mean speed up ?
i think speeding upi and slowin down depends on the PC speed ...
Was This Post Helpful? 0

#3 thava  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 180
  • View blog
  • Posts: 1,606
  • Joined: 17-April 07

Re: excel report from vb6.0

Posted 27 April 2010 - 12:23 AM

this is not a fair way to import to a excel if you do not do any calculation there,

there are lot of other ways to import to a excel from vb,
just Google it,
if you can't find anything,Surely i will post the link here

This post has been edited by thava: 27 April 2010 - 12:23 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1