Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there,
Thanks thanks for your help... To see what this macro is all about, please follow this link : http://www.good2know.freesurf.fr/startengtemp.html And the complete macro : Sub InsertRepresentativesInitials() Dim ClasseurRep As Workbook Dim Numdpt As String Dim Colonne As Variant Dim Initiales Set ClasseurRep = GetObject("C:\TPExcel\Representants.xls") Range("D4").Select While ActiveCell.Value < "" Numdpt = Left(ActiveCell.Value, 2) Set Colonne = ClasseurRep.Sheets(1).Range("A4:F20").Find(What:=N umdpt, _ LookIn:=xlFormulas, LookAt:=xlWhole).Address Colonne = Range(Colonne).Column Colonne = CInt(Colonne) Initiales = ClasseurRep.Sheets(1).Cells(3, Colonne).Comment.Text ActiveCell.Offset(0, -1).Range("A1").Select Wend Set ClasseurRep = Nothing Workbooks("clients.xls").Close End Sub And the not working line : Set Colonne = ClasseurRep.Sheets(1).Range("A4:F20").Find(What:=N umdpt, _ LookIn:=xlFormulas, LookAt:=xlWhole).Address I have tried a few of your answers, maybe I have missed one or two, but it still wouldn't work. This macro is from a book about Excel and VBA 2003. I am learning the basic of VBA programming from there. Hope this can help you help me. Cheers, Pascal |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Real Newbie newbie question | New Users to Excel | |||
help for an excel newbie | Excel Worksheet Functions | |||
Please help an Excel Newbie! | New Users to Excel | |||
Excel VBA Newbie | Excel Programming | |||
Newbie help...VBA w/ Excel | Excel Programming |