Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|