Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
jos jos is offline
external usenet poster
 
Posts: 1
Default Excel macro problem cursor down

to make a datarange variable in a macro, I need to put the comman
"down" (cursor one or more steps down). I can not find the exac
command phrase

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Excel macro problem cursor down

Your question is none too clear, but it might be that resize will help you.
For instance

Set myRange = Range("A1").Resize(10,5)

will create a range variable that is 10 rows and 5 columns in
dimension.Obviously you could have variable to calculate the rows and
columns and plug them into that code..

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"jos " wrote in message
...
to make a datarange variable in a macro, I need to put the command
"down" (cursor one or more steps down). I can not find the exact
command phrase.


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel macro problem cursor down

Dim rng as Range
set rng = Range(Activecell,ActiveCell.end(xldown))

rng.name = "Datarange"


or

set rng = ActiveCell.End(xldown)

or

set rng = Range("A1").End(xldown)

--
Regards,
Tom Ogilvy

"jos " wrote in message
...
to make a datarange variable in a macro, I need to put the command
"down" (cursor one or more steps down). I can not find the exact
command phrase.


---
Message posted from http://www.ExcelForum.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Cursor... and other things akphidelt Excel Discussion (Misc queries) 0 December 20th 07 01:27 AM
From Macro in Excel find cursor location eg.C7 kt(uk) Excel Discussion (Misc queries) 1 May 10th 06 03:03 PM
Can I change the "white cross" cursor in Excel to another cursor? KFEagle Excel Discussion (Misc queries) 1 May 3rd 05 08:01 PM
Visual Basic Help Wizard/Index problem, can't get cursor HelpNeeded Excel Discussion (Misc queries) 3 March 4th 05 03:46 AM
Cursor Movement in Macro Don Guillett[_4_] Excel Programming 1 August 5th 03 04:52 PM


All times are GMT +1. The time now is 10:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"