Right Justify Listbox when using Count Function
Hello everyone, I need some help on right justifying in a listbox. My professor gave us an example of how to do it. But on this program I had to use the Count function to put text in the listboxes so I dont know how to make the right justifying work. I've tried everyway I could think of. I dont know if its that I cant find the right place to put it or what. This is what I have for the Counts and what my professor gave me. In help will be appreciated...
**********THIS IS WHAT I HAVE******************
Private Sub Form_Load()
Dim intHours As Integer
Dim intHourlyRate As Currency
Dim intLength As Integer ' I put these here because of the
Dim strHours As String ' example my professor
Dim strHourlyRate As String ' gave me.
intHours = 30
intHourlyRate = 5
For intHours = 30 To 150
lstHours.AddItem intHours
Next
For intHourlyRate = 5.001 To 150.001 Step 0.5
lstHourlyRate.AddItem Format(intHourlyRate, "currency")
Next
End Sub
************THIS IS WHAT MY PROF GAVE ME************
**in this example we had to get user input from a textbox and put it in the listbox. that is why there is the strentry
dim strentry as string
strentry = format (curentry, "currency")
intlength = len(strentry)
strentry = space (10-intlength) & strentry
lstentries.additem strentry