Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Reviewing a list of defined named ranges

I have the following snippet of code

For i = 1 To Cells(Rows.Count, "A").End(xlUp).Row
Set REF = Cells(i, "a")
Application.Goto Reference:=REF
Exit Sub
MsgBox ("Displaying " & Cells(i, "A"))
Next i

It's not going to the reference. What do I need to change?

Thanks,
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Reviewing a list of defined named ranges

try removing Exit sub
or simpler??
For i = 1 To Cells(Rows.Count, "A").End(xlUp).Row
MsgBox ("Displaying " & Cells(i, "A"))
Next i


--
Don Guillett
SalesAid Software

"Barb Reinhardt" wrote in message
...
I have the following snippet of code

For i = 1 To Cells(Rows.Count, "A").End(xlUp).Row
Set REF = Cells(i, "a")
Application.Goto Reference:=REF
Exit Sub
MsgBox ("Displaying " & Cells(i, "A"))
Next i

It's not going to the reference. What do I need to change?

Thanks,



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Reviewing a list of defined named ranges

Oops, I should have removed the EXIT SUB. In column A, I have a named range.
I want to step through them one by one to view them. How do I do that?

Thanks

"Don Guillett" wrote:

try removing Exit sub
or simpler??
For i = 1 To Cells(Rows.Count, "A").End(xlUp).Row
MsgBox ("Displaying " & Cells(i, "A"))
Next i


--
Don Guillett
SalesAid Software

"Barb Reinhardt" wrote in message
...
I have the following snippet of code

For i = 1 To Cells(Rows.Count, "A").End(xlUp).Row
Set REF = Cells(i, "a")
Application.Goto Reference:=REF
Exit Sub
MsgBox ("Displaying " & Cells(i, "A"))
Next i

It's not going to the reference. What do I need to change?

Thanks,




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create new list with defined ranges BKO Excel Worksheet Functions 0 June 13th 07 11:35 AM
Create new list with defined ranges BKO Excel Worksheet Functions 0 June 13th 07 11:30 AM
VBA Script to Print several named ranges to PDF with cell-defined filenames jbmessamore Excel Programming 0 July 14th 06 03:34 PM
Using a data validation list to look up a defined named range in another worksheet Laura Hunt Charts and Charting in Excel 0 November 24th 05 02:29 PM
ADO - recordset - closed excel workbook - know sheet name and cell name but no named ranges defined grahamd Excel Programming 1 October 18th 04 06:13 PM


All times are GMT +1. The time now is 05:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"