Capture Dynamic Range address into Modeless Form

  • Thread starter Thread starter pining
  • Start date Start date
P

pining

Hi! I am new here and would like to ask for your assistance regarding m
problem.

I would like to capture the range address of whatever it is that th
user selects on the active worksheet into a textbox in a modeles
form. The user just have to set the focus in one of the textboxes the
select a range from the worksheet and the range address should b
captured inside the textbox.

The function is similar to that of getting the List Range or Criteri
Range address in the Advanced Filter window of Excel.

Hope you could help me out with this.

Thanks,
Pinin
 
Hi
use a refedit control for this. This should be in the toolbox then you
create a userform)
 
When the range is selected this way, it because the selection, so just use

Selection.Address

or Selection.Address(False, False)

if you don't want the $s. Note that this doesn't get the worksheet name as
well.

Advanced filter actually uses a Reedit control, which does what you want as
well, so you might consider using that. But be aware, RefEdikt is flaky, and
should NEVER be embedded in a frame.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
note:
use Address(External:=True) to get a proper fully qualified string.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top