Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Select a certain number of cells in a row
Hi,
I'd like to have the macro to select row 5 to 10 in the active column. May I know what is the VB code to write? Regards, Valerie |
#2
|
|||
|
|||
Select a certain number of cells in a row
maybe...
dim myRng as range dim myCol as long with activesheet mycol = activecell.Column set myrng = .range(.cells(5,mycol),.cells(10,mycol)) end with myrng.select ======= or with activesheet .cells(5,activecell.column).resize(6).select end with I'm not quite sure why you want to select that range. But for the most part, if you act directly on the range (and avoid .selects), you're code will work faster and be easier to modify. Dolphinv4 wrote: Hi, I'd like to have the macro to select row 5 to 10 in the active column. May I know what is the VB code to write? Regards, Valerie -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Select unused number | Excel Worksheet Functions | |||
How do I select individual cells for a chart | Charts and Charting in Excel | |||
Number format exactly the same, displays differently in some cells | Excel Discussion (Misc queries) | |||
Conversion | Excel Worksheet Functions | |||
Count number of shaded cells | Excel Discussion (Misc queries) |