|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
VB Formating question --- SIMPLE ?
I have a VB program that i did not write but need to alter slightly. This application exports columns and data to Excel. One column (column L in Excel) formats to currency for some reason (ex $9.90) but it should be a % column (9.90%).
How can I alter my code to get that format? Code:
Do Until res.EOF
For j = 1 To res.rdoColumns.Count
If j = 8 Then
wsXL.Cells(i, j).Value = Format(res.rdoColumns(j - 1).Value, "0.00")
Else
If res.rdoColumns(j - 1).Name = "dealer_fee" Or res.rdoColumns(j - 1).Name = "manf_fee" Or res.rdoColumns(j - 1).Name = "doc_fee" Then
wsXL.Cells(i, j).Value = res.rdoColumns(j - 1).Value & "%"
Else
wsXL.Cells(i, j).Value = res.rdoColumns(j - 1).Value
End If
End If
Any and all help would be greatly appreciated.
__________________
I would rather know than not know at all... ![]() |
|
#2
|
|||
|
|||
|
I'd run a trace on your condition chapman, put a message box in where you want it to run as % and then step-through your code. Also place a mssg box in the else statement incase this is where its leading too.
|
|
#3
|
||||
|
||||
|
Thanks for the look. I actually found a simple solution. I was able to call the field from my recordset and just format it that way... Problem solved! Thanks for the look though!
|
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > VB Formating question --- SIMPLE ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|