Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to work with a range; the location, size etc., is defined by the
user highlighting an area on the worksheet then starting up a macro. How do I use the currently highlighted area as a range? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use the Selection object. E.g.:
Selection.Interior.ColorIndex = 6 In article , noyb wrote: I want to work with a range; the location, size etc., is defined by the user highlighting an area on the worksheet then starting up a macro. How do I use the currently highlighted area as a range? Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This highlighted area is called the selected range, and can be accessed in
VBA with the Selection object. Selection.Address returns the address of that selection, etc. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "noyb" wrote in message ... I want to work with a range; the location, size etc., is defined by the user highlighting an area on the worksheet then starting up a macro. How do I use the currently highlighted area as a range? Thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Selection
as in msgbox Selection.Address -- Regards, Tom Ogilvy "noyb" wrote in message ... I want to work with a range; the location, size etc., is defined by the user highlighting an area on the worksheet then starting up a macro. How do I use the currently highlighted area as a range? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
deselecting a highlighted range after a VBA copy procedure | Excel Programming | |||
Shading on highlighted range of cells | Excel Discussion (Misc queries) | |||
Need undo a highlighted spreadsheet where there's no white area. | New Users to Excel | |||
Count Highlighted numbers in an area | Excel Discussion (Misc queries) | |||
autosum refusal to sum highlighted range | Excel Worksheet Functions |