Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run Macros on a Selection in Excel

Status
Not open for further replies.

irlbinky

Programmer
Aug 7, 2002
23
0
0
IE
Just wondering if anyone knows what code to use in a macro so it will only be executed on the selected cells?

Thanks
Cathal
 
check out the Selection Property

from Excel VBA help:

Application object: Returns the selected object in the active window.
Window object: Returns the selected object in the specified window.

Remarks

The returned object type depends on the current selection (for example, if a cell is selected, this property returns a Range object). The Selection property returns Nothing if nothing is selected.
Using this property with no object qualifier is equivalent to using Application.Selection.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top