#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default

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
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



All times are GMT +1. The time now is 08:38 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"