Determine currently selected cells at start of macro

  • Thread starter Thread starter Piers 2k
  • Start date Start date
P

Piers 2k

Hi folks,

Macro to create a chart. Works fine, except I have to use an InputBox for
the user to enter the range.

I'd prefer for the macro to determine the currently selected cells at the
start, and use that as the range. Any ideas?

Thankx in advance,
Piers
 
Hi there,

The Selection.Address will give you a reference to the current selection as
a string.

Shafiee.
 
Selection will give you the range itself

Set rng = Selection

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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