Re: $$Excel-Macros$$ How to get the address of a cell in VBA

2011-01-24 Thread siti Vi
Sub ABCFoundCell() Dim x As Range Set x = Cells.Find(What:="ABC", _ After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, _ SearchDirection:=xlNext, MatchCase:=False, _ SearchFormat:=False) MsgBox "the cell address is : " & x.Address End Sub

Re: $$Excel-Macros$$ How to get the address of a cell in VBA

2011-01-24 Thread hanumant shinde
>Subject: Re: $$Excel-Macros$$ How to get the address of a cell in VBA > > >check the attachement > >Sub ABC() >Dim I, J, K As Long >Dim foundcell As Range > Set foundcell = Sheets(1).Range("a1") > Set foundcell = Sheets(1).Columns(1).Find(What:=10, After:=fo

$$Excel-Macros$$ How to get the address of a cell in VBA

2011-01-21 Thread Mao
Hi there, I have a question about how to locate the address of the cell in VBA For example, I am looking for "ABC" in my sheet. By using FIND function, I got the location as A1. How could I write this location into one variable? So when later I am using ABC again, I could refer Range("A1") direc