![]() |
Determine currently selected cells at start of macro
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 |
Determine currently selected cells at start of macro
Hi there,
The Selection.Address will give you a reference to the current selection as a string. Shafiee. "Piers 2k" wrote in message ... 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 |
Determine currently selected cells at start of macro
Selection will give you the range itself
Set rng = Selection -- HTH RP (remove nothere from the email address if mailing direct) "Mohamed Shafiee" wrote in message ... Hi there, The Selection.Address will give you a reference to the current selection as a string. Shafiee. "Piers 2k" wrote in message ... 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 |
All times are GMT +1. The time now is 02:41 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com