jmaocubo
02-13-2012, 04:01 AM
I have the following code which lists the values in column E. The problem is that this value is the result of a formula whose value may have several decimal places. How do I list the result with only one decimal place?
Private Sub UserForm_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Dim Rng As Range
Set Rng = Range(Sheets("Auxiliar").Range("A1"), Sheets("Auxiliar").Range("A" & rows.Count).End(xlUp)).Resize(, 5)
With ListBox1
.ColumnCount = 2
.ColumnWidths = "50,30"
.List = Application.Index(Rng, Evaluate("row(" & Rng.Address & ") "), Array(1, 5))
End With
End Sub
Thanks in advance
Private Sub UserForm_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Dim Rng As Range
Set Rng = Range(Sheets("Auxiliar").Range("A1"), Sheets("Auxiliar").Range("A" & rows.Count).End(xlUp)).Resize(, 5)
With ListBox1
.ColumnCount = 2
.ColumnWidths = "50,30"
.List = Application.Index(Rng, Evaluate("row(" & Rng.Address & ") "), Array(1, 5))
End With
End Sub
Thanks in advance