There are a lot of ways. To read cell contents. Here is one:
Sub readValsInCol()
Const myColumn = "A"
'Change to "B" "C", "D", "AB" etc
'depending which column you wish to check
' If you need to read more columns you need
' to change code
strt = ActiveSheet.UsedRange.Row
'gives first row of the used range
fin = ActiveSheet.UsedRange.Rows.Count
'gives number of rows in the used range
For i = strt To fin
'loop through rows of the used range
myval = Range(myColumn & i).Value
Debug.Print myval ' do what you wish here
Next i
End Sub
--
Steve
"vidhya" <(E-Mail Removed)> wrote in message
news:75874154-0D5F-44E8-9B21-(E-Mail Removed)...
> Hi,
>
> Can anyone plz tell me how to read a specific column values and get its
> contents.
> I managed to read the specific sheet tat i want and now i need to get the
> first column values and also first column count..... and get its
> contents...
>
> I dont want to use oledb, ie reading from database.. i checked some posts,
> but all those are reading database... i dont want it....
|