![]() |
How To:
Hi, what I'd like to be able to do is to return the value
of each cell contained in a range that is returned from the an input box. If a user selects several cells for example 3 cells B2, D2, H2 the returning Range.Address looks like this : "$B$2,$D$2,$H$2" so I like to obtain each value stored in these three cells. Sample Input box Dim rgeField as Range Set rgeField = Application.InputBox(Prompt:="Select the field name(s) that you would like to associate with the pipeline field.", Title:="Field Name", Type:=8) 'Code to iterate through each selected cell Debug.Print rgeField.Address Thank you in advance regards KM |
Dim cell as Range
Dim rgeField as Range Set rgeField = Application.InputBox(Prompt:="Select the field name(s) that you would like to associate with the pipeline field.", Title:="Field Name", Type:=8) for each cell in rgeField 'Code to iterate through each selected cell Debug.Print cell.Address Next -- Regards, Tom Ogilvy "Kevin McCartney" wrote in message ... Hi, what I'd like to be able to do is to return the value of each cell contained in a range that is returned from the an input box. If a user selects several cells for example 3 cells B2, D2, H2 the returning Range.Address looks like this : "$B$2,$D$2,$H$2" so I like to obtain each value stored in these three cells. Sample Input box Dim rgeField as Range Set rgeField = Application.InputBox(Prompt:="Select the field name(s) that you would like to associate with the pipeline field.", Title:="Field Name", Type:=8) 'Code to iterate through each selected cell Debug.Print rgeField.Address Thank you in advance regards KM |
All times are GMT +1. The time now is 11:55 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com