954,153 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Is there any one who know this?

I am doing one project in which Whenever I export the result, the list of record should be extracted as Excel file and the list of record should be listed within Excel Table with formated Line.

So, I want to format Excel from VB so as to make line / Table, If any one know hoe to make line or Table in Excel by using VB6, tell me please.

K.Vanlalliana
Light Poster
44 posts since Jul 2008
Reputation Points: 10
Solved Threads: 4
 

you need to use excel library for the purpose.

debasisdas
Posting Genius
6,870 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
 

Oh Debasi,

I always expect you to answer my question, but your answer too vaque, I just find the answer tonight from some site, and I am trying for this, but line is not funtioning till now, do you know what is wrong with my VB code as below:

Dim obExcelApp As Object
Dim obWorkSheet As Object

obWorkSheet.Range("A3").Select
selection.Borders(xlDiagonalDown).LineStyle = xlAutomatic 'xlNone
selection.Borders(xlDiagonalUp).LineStyle = xlAutomatic 'xlNone

With selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With

K.Vanlalliana
Light Poster
44 posts since Jul 2008
Reputation Points: 10
Solved Threads: 4
 

is that throwing any error or simply not functioning ?

debasisdas
Posting Genius
6,870 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
 

Hi Debasi,

It does not give error, it simply not functioning, that is why I am very confusing. It tried in so many ways for about three night. If you can give me the correction / my fault, I shall be very very glad.

K.Vanlalliana
Light Poster
44 posts since Jul 2008
Reputation Points: 10
Solved Threads: 4
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You