Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VB TAB doesn't move activecell??

Hi,

I'm using the SendKeys ["{tab}"] command in Excel 97 VB. The problem
I have is that the activecell doesn't move accross with cursor, it
stays on the same cell. For example if my cursor is on cell A1 and I
press tab, I move to cell B1 and that's my new active cell. If I do
the same but using VB and the SendKeys ["{tab}"] command, the cursor
moves but my activecell remains as A1.
I can't use an offset as my cursor may need to go down instead of
accross depending on what I've selected. That's why I'm using the TAB
command as it will only go through the selection I've highlighted.

I would appreciate any help!!

Thanks in anticipation,

Ben
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default VB TAB doesn't move activecell??

Possibly

Sub tester1()
For Each cell In Selection
cell.Activate
Next
End Sub

depends on what you are doing.

--
Regards,
Tom Ogilvy

"Ben W" wrote in message
om...
Hi,

I'm using the SendKeys ["{tab}"] command in Excel 97 VB. The problem
I have is that the activecell doesn't move accross with cursor, it
stays on the same cell. For example if my cursor is on cell A1 and I
press tab, I move to cell B1 and that's my new active cell. If I do
the same but using VB and the SendKeys ["{tab}"] command, the cursor
moves but my activecell remains as A1.
I can't use an offset as my cursor may need to go down instead of
accross depending on what I've selected. That's why I'm using the TAB
command as it will only go through the selection I've highlighted.

I would appreciate any help!!

Thanks in anticipation,

Ben



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 292
Default VB TAB doesn't move activecell??

Hi Ben

SendKeys is very very vulnerable. See if you can use one of these:

Sub GoNext()
ActiveCell.Next.Activate
End Sub

Sub GoDown()
ActiveCell.Offset(1, 0).Activate
End Sub

HTH. Best wishes Harald

"Ben W" skrev i melding
om...
Hi,

I'm using the SendKeys ["{tab}"] command in Excel 97 VB. The problem
I have is that the activecell doesn't move accross with cursor, it
stays on the same cell. For example if my cursor is on cell A1 and I
press tab, I move to cell B1 and that's my new active cell. If I do
the same but using VB and the SendKeys ["{tab}"] command, the cursor
moves but my activecell remains as A1.
I can't use an offset as my cursor may need to go down instead of
accross depending on what I've selected. That's why I'm using the TAB
command as it will only go through the selection I've highlighted.

I would appreciate any help!!

Thanks in anticipation,

Ben



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
If activecell.column = variable then activecell,offset (0,1) Battykoda via OfficeKB.com Excel Discussion (Misc queries) 1 October 2nd 07 08:05 PM
activecell slikity Excel Programming 7 December 13th 04 11:59 AM
Move ActiveCell down 12 then add up 11 above.... [email protected] Excel Programming 2 June 22nd 04 04:45 PM
use of activecell inquirer Excel Programming 8 May 16th 04 06:39 AM
Activecell value Shamsul Islam Excel Programming 5 April 30th 04 10:10 PM


All times are GMT +1. The time now is 01:58 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"