![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: England
Posts: 212
|
Is there code which replicates these keystrokes, as I'm trying to select a particular range, starting from an activecell. Also, is there code for CTRL and the other arrown directions?
thanks Matt |
|
|
|
|
|
#2 |
|
Guest
Posts: n/a
|
Yes.
Activecell.End(xlDown).select xldown can be replaced with Toleft or Toright or Up James |
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: England
Posts: 212
|
Thanks James
Do you have any ideas why the following code is not working. Obviously, I'm doing something completely wrong but cannot work out what. Set myrange = Worksheets("Sheet3").Range(ActiveCell, Worksheets("Sheet3").ActiveCell.End(xlDown).Offset(0, 2)) |
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Winnipeg
Posts: 2,330
|
Quote:
Set myrange = Worksheets("Sheet3"). _ Range(ActiveCell.Address, Worksheets("Sheet3"). _ ActiveCell.End(xlDown).Offset(0, 2).Address) Regards,
__________________
Barrie Davidson "You're only given a little spark of madness. You mustn't lose it." - Robin Williams |
|
|
|
|
|
|
#5 |
|
Guest
Posts: n/a
|
Set myrange = Worksheets("Sheet3").Range(ActiveCell, ActiveCell.End(xlDown).Offset(0, 2))
|
|
|
|
#6 |
|
Board Regular
Join Date: Feb 2002
Location: England
Posts: 212
|
Thanks for your help guys
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|