View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Les Les is offline
external usenet poster
 
Posts: 240
Default Loop to insert data from a form - Help

Hi all, i have created the code below to loop through all the part numbers
intererd into txt_PrtNumber, this is working fine, but now i need to add the
part description as well, i am baffled here and do not know what to do.

Any help would be much appreciated.

Dim vPrtNums As String, lmyAdd As Variant
Dim MyNums As Variant, sPrtDescr As String, myDescr As Variant
Dim i, d
vPrtNums = frm_InputTM.txt_PrtNumber
i = Split(vPrtNums, ",")
MyNums = i
If frm_InputTM.Opt_SevPartsOneSupp = True Then

For Each i In MyNums
If i = "" Then


Else
With ActiveWorkbook.ActiveSheet
Range(vmyCol & vmyRow) = i
Range(vmyCol & vmyRow).Offset(0, 4) = sPrtDescr
Range(vmyCol & vmyRow).Offset(0, 5) = sModel
End With
End If
vmyRow = vmyRow + 1
Next
End If



--
Les