Getting the Auto List in VBA


Posted by Mike on February 14, 2002 9:06 AM

The auto list doesn't come up after Cells(i).
Revised is an already existing named range.


Dim i As Integer
i = Range("Revised").Cells.Count

'It doesn't come up:
Range("Revised").Cells(i).

'This works but not thru the auto list:
Range("Revised").Cells(i).Interior.Color = vbYellow

Thanks Mike



Posted by JohnG on February 14, 2002 9:22 AM

Try
Dim Revised As String 'act as named range
Dim i As Integer

Revised = "A1:A5"
i = Range(Revised).Cells.Count

'It doesn't come up:
'Range(Revised).Cells(i).

'This works but not thru the auto list:
Range(Revised).Interior.ColorIndex = 6 'vbYellow

colorindex doesnt seem to like the vbyellow