Although there are API calls to allow you to do this you don't need them in VB. Form's have a TextWidth property. So. for example, just have a hidden form with it's scalemode set to pixels and then something like the following:
[tt]
Option Explicit
Private Sub Command1_Click()
Debug.Print GetTextPixelWidth("i", Text1)
End Sub
Private Function GetTextPixelWidth(strText As String, SourceControl As Control) As Single
Set HiddenForm.Font = SourceControl.Font
GetTextPixelWidth = HiddenForm.TextWidth(strText)
End Function