Add notes from Excel to drawing challenge!

Fellow SWX users:

I am trying to pull a range of cells from Excel into aSolidworksDrawing. The current code below:

Private Sub AddNotes_Click()Set swApp=CreateObject("SldWorks.Application")Set Part =swApp.ActiveDocSetSelMgr = Part.SelectionManagerDim Note AsObjectDim Annotation AsObjectDim TextFormat As ObjectSet Note =Part.InsertNote("NOTES:"& Chr(13) & Chr(10)& _ "" &Range("B40")& Chr(13) & Chr(10) & _ Range("B41")&Chr(13) & Chr(10) & _ Range("B42") & Chr(13)&Chr(10) & _ Range("B43") & Chr(13) &Chr(10) & _Range("B44") & Chr(13) & Chr(10)& _ Range("B45") &Chr(13) & Chr(10) & _Range("B46") & Chr(13) &Chr(10) & _Range("B47") & Chr(13) & Chr(10) &_Range("B48") & Chr(13) & Chr(10) &_Range("B49"))Retval = Note.SetTextPoint(0.011,0.205,0)Note.settextjustification (swtextjustificationleft)If NotNote IsNothing Then Note.Angle = 0 Retval = Note.SetBalloon(0, 0)SetAnnotation = Note.GetAnnotation() Annotation.Layer="Annotations" If Not Annotation Is Nothing Then Retval=Annotation.SetLeader2(False, 0, True, True, False, False) EndIfEndIfFor i = 0 To Annotation.GetTextFormatCount - 1 SetTextFormat =Annotation.GetTextFormat(i) TextFormat.LineLength = 5 *0.0254 bRet= Annotation.SetTextFormat(i, False, TextFormat):Debug.AssertbRetNextPart.ClearSelection2TruePart.GraphicsRedraw2End Sub

(Sorry if it is unformatted) can add the note at a certainpointand to a certain width (5"), but it will always add 10lines,based on the default ranges. I want to add the notesindynamically, based on the number of non-blank cells inExcel(CountA, anyone?) but I am too much of a newbie to VB ingeneral toknow how to properly frame a For/Next or If/Thenstatement to getit to happen.

Secondly, I would like it if the setpoint was based adistance fromthe upper left hand corner of the drawing size(Sheet.Getsize?) andif the notes were left aligned, overriding thecenter alignedsetting for our document templates(swTextJustificationLeft?). Iknow the VBA commands, but I amuntrained in the proper syntax forcompleting the code.

Any suggestions? I consulted the help, but it really isn'tthathelpful for a self-taught learner like myself. Thank youverymuch!!SolidworksApi macros