A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
thanks for the reply
Regards,
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
Using the code below, second column is not aligned right?
With ListView1
.ColumnHeaders.Add , , "BU/SF", 100, lvwColumnLeft
.ColumnHeaders.Add , , "Amount", 90, lvwColumnRight
.View = 3
End With
k = 1
For j= 1 To .CurrentRegion.Columns.Count
If .Offset(i, j).Value <> 0 Then
strColumns = .Offset(3, j).Value
strValues = Format(.Offset(i, j).Value, "#,###")
ListView1.ListItems.Add , , strColumns
ListView1.ListItems(k).SubItems(1) = strValues
k = k + 1
End If
Next j
End With
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
thanks for the reply
Regards,
Make a new file
Add a Userform
Add a ListView
Add the code below
Run the Userform
I can not see the issue:
Andreas.
Private Sub UserForm_Initialize()
Dim k As Integer
With ListView1
.ColumnHeaders.Add , , "BU/SF", 100, lvwColumnLeft
.ColumnHeaders.Add , , "Amount", 90, lvwColumnRight
.View = lvwReport
For k = 1 To 5
.ListItems.Add , , "A" & k
.ListItems(.ListItems.Count).SubItems(1) = Format(k * 1000, "#,###")
Next
End With
End Sub