Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Selecting Cells

Hey,

I'm trying to select the next cell down, just like you would if you used the
up and down keys on your keyboard. What code could I use?

I tried this already but it doesn't work:

Range("B3").Activate
ActiveCell.Next(x1Down).Select

Any suggestions?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Selecting Cells

Hi
Try:
ActiveCell.Offset(1, 0).Select
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Gabe" wrote:

Hey,

I'm trying to select the next cell down, just like you would if you used the
up and down keys on your keyboard. What code could I use?

I tried this already but it doesn't work:

Range("B3").Activate
ActiveCell.Next(x1Down).Select

Any suggestions?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Selecting Cells

Alright this is about to get complicated so bear with me,

The reason I need it to do exactely what the arrow keys do is because, I
have grouped cells B4:B9. If I use the arrow keys, excel automatically goes
from B3 to B10. So you see the offset command won't work! Now what!?

"sebastienm" wrote:

Hi
Try:
ActiveCell.Offset(1, 0).Select
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Gabe" wrote:

Hey,

I'm trying to select the next cell down, just like you would if you used the
up and down keys on your keyboard. What code could I use?

I tried this already but it doesn't work:

Range("B3").Activate
ActiveCell.Next(x1Down).Select

Any suggestions?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Selecting Cells

I see. What about:
Range("B3").Activate
Application.SendKeys "{DOWN}"
Probably not the best to use SendKeys, but depending on what your overall
process is, it could be just working fine.
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Gabe" wrote:

Alright this is about to get complicated so bear with me,

The reason I need it to do exactely what the arrow keys do is because, I
have grouped cells B4:B9. If I use the arrow keys, excel automatically goes
from B3 to B10. So you see the offset command won't work! Now what!?

"sebastienm" wrote:

Hi
Try:
ActiveCell.Offset(1, 0).Select
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Gabe" wrote:

Hey,

I'm trying to select the next cell down, just like you would if you used the
up and down keys on your keyboard. What code could I use?

I tried this already but it doesn't work:

Range("B3").Activate
ActiveCell.Next(x1Down).Select

Any suggestions?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Selecting Cells

Try selection.offset(1,0).select
or activecell.offset(1,0).select
or range("B1").select
or [b1].select
or .offset(1,0). means 1 cell down
or .offset(0,1). means 1 cell right
or .offset(-1,0). means 1 cell up
or .offset(0,-1). means 1 cell left


"Gabe" wrote in message
...
Hey,

I'm trying to select the next cell down, just like you would if you used
the
up and down keys on your keyboard. What code could I use?

I tried this already but it doesn't work:

Range("B3").Activate
ActiveCell.Next(x1Down).Select

Any suggestions?





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Selecting Cells

I copied the example you wrote but it's not working, is there something I
have to change in the example first?

"sebastienm" wrote:

I see. What about:
Range("B3").Activate
Application.SendKeys "{DOWN}"
Probably not the best to use SendKeys, but depending on what your overall
process is, it could be just working fine.
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Gabe" wrote:

Alright this is about to get complicated so bear with me,

The reason I need it to do exactely what the arrow keys do is because, I
have grouped cells B4:B9. If I use the arrow keys, excel automatically goes
from B3 to B10. So you see the offset command won't work! Now what!?

"sebastienm" wrote:

Hi
Try:
ActiveCell.Offset(1, 0).Select
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Gabe" wrote:

Hey,

I'm trying to select the next cell down, just like you would if you used the
up and down keys on your keyboard. What code could I use?

I tried this already but it doesn't work:

Range("B3").Activate
ActiveCell.Next(x1Down).Select

Any suggestions?

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Selecting Cells

hmm ... no.
- what is the selected cell before you run the macro
- what is the selected cell after you run the macro (it should ebnd up is B4)
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Gabe" wrote:

I copied the example you wrote but it's not working, is there something I
have to change in the example first?

"sebastienm" wrote:

I see. What about:
Range("B3").Activate
Application.SendKeys "{DOWN}"
Probably not the best to use SendKeys, but depending on what your overall
process is, it could be just working fine.
--
Regards,
Sébastien
<http://www.ondemandanalysis.com

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Selecting Cells

B3 befroe I run it, B3 after I run it.

"sebastienm" wrote:

hmm ... no.
- what is the selected cell before you run the macro
- what is the selected cell after you run the macro (it should ebnd up is B4)
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Gabe" wrote:

I copied the example you wrote but it's not working, is there something I
have to change in the example first?

"sebastienm" wrote:

I see. What about:
Range("B3").Activate
Application.SendKeys "{DOWN}"
Probably not the best to use SendKeys, but depending on what your overall
process is, it could be just working fine.
--
Regards,
Sébastien
<http://www.ondemandanalysis.com

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Selecting Cells

Oh I get it!, I had to create a command button in excelassign the
macroclose VBAthen run it from excel. Before I was in VBA jusk clicking the
F8 button through each step. Cool thanks sebastien for your help.

"Gabe" wrote:

B3 befroe I run it, B3 after I run it.

"sebastienm" wrote:

hmm ... no.
- what is the selected cell before you run the macro
- what is the selected cell after you run the macro (it should ebnd up is B4)
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Gabe" wrote:

I copied the example you wrote but it's not working, is there something I
have to change in the example first?

"sebastienm" wrote:

I see. What about:
Range("B3").Activate
Application.SendKeys "{DOWN}"
Probably not the best to use SendKeys, but depending on what your overall
process is, it could be just working fine.
--
Regards,
Sébastien
<http://www.ondemandanalysis.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
Selecting multiple cells, I can't see the cells highlighted ET Excel Discussion (Misc queries) 1 August 1st 08 03:20 PM
How to change shade of cells when selecting multiple cells abrummet Excel Discussion (Misc queries) 3 September 6th 07 11:42 AM
By selecting cells adjacent to cells tally sheet tom Excel Worksheet Functions 2 September 20th 06 07:09 PM
Selecting 2 cells together Brian Excel Programming 3 September 18th 04 05:14 PM
selecting cells [email protected] Excel Programming 2 November 5th 03 08:31 AM


All times are GMT +1. The time now is 07:50 AM.

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

About Us

"It's about Microsoft Excel"