View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Select data to imput to macro

You have at least a couple of choices.

You could have the user (you???) select the range first, then run the macro.
Then your macro could work on the current selection.

Or you could ask the user for the range in your macro:

#1.

Dim myRng as range
set myrng = Selection

#2.

Dim myRng as range
set myRng = nothing
on error resume next
set myrng = application.inputbox(Prompt:="Please select a range", type:=8)
on error goto 0

if myrng is nothing then
'user hit cancel
else
'do what you want
end if

But I'm not sure what you're really doing.

sofast1651 wrote:

Regarding the following macro, how do I tell the macro what data to work with
and transfer to one column? Or, how do I select the data and run the macro?


--

Dave Peterson