Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
newbie, vba simple prg from a book doesn't write...see vlookup with vba?
Hi there, message already posted as a reply but fallen into disuse
Thanks thanks for your help anyway... 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) 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.Tex t 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 Just a question in between, is this line equivalent to v/hlookup function in Excel? 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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Newbie he I have a question about a print macro I am trying to write... | Excel Programming | |||
Newbie questions - probably simple | Excel Programming | |||
I want to write a book on my computer.How can I type? | New Users to Excel | |||
How do I get a Template to write a Book ? | New Users to Excel | |||
IF then write new worksheet/book | Excel Programming |