#1   Report Post  
Posted to microsoft.public.excel.misc
Ken G.
 
Posts: n/a
Default Correct VBA syntax

What is the correct vba syntax to use to make a particular cell the active
cell when the row number and column number are known?
  #2   Report Post  
Posted to microsoft.public.excel.misc
JE McGimpsey
 
Posts: n/a
Default Correct VBA syntax

One way:

ActiveSheet.Cells(rownum, colnum).Activate



In article ,
Ken G. wrote:

What is the correct vba syntax to use to make a particular cell the active
cell when the row number and column number are known?

  #3   Report Post  
Posted to microsoft.public.excel.misc
exceluserforeman
 
Posts: n/a
Default Correct VBA syntax


If the current cell is known (even if you do not know where that is) and you
want to know the value of a cell 2 columns over and 5 rows down then

activecell.offset(0,0).select

msgbox activecell.offset(5,2) .value,vbinformation, "Offset Manager"


- - Mark


"Ken G." wrote:

What is the correct vba syntax to use to make a particular cell the active
cell when the row number and column number are known?

  #4   Report Post  
Posted to microsoft.public.excel.misc
Ken G.
 
Posts: n/a
Default Correct VBA syntax

Thanks for this. I'm trying to get the active cell to remain the same when
enter is pressed, but in a protected sheet it jumps to the next unprotected
cell. I thought I may have been able to do it with your response below but I
can't get it to work. Can you help with a macro to do this?

"JE McGimpsey" wrote:

One way:

ActiveSheet.Cells(rownum, colnum).Activate



In article ,
Ken G. wrote:

What is the correct vba syntax to use to make a particular cell the active
cell when the row number and column number are known?


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
Running auto correct on startup? Mitch Excel Discussion (Misc queries) 1 November 28th 05 06:38 PM
BringToFront syntax question RAP Charts and Charting in Excel 2 August 28th 05 01:34 AM
Insert more than 1 Row Syntax blazzae Excel Worksheet Functions 5 July 10th 05 12:46 AM
what is the correct syntax for an allowable circular reference? excell idiot Excel Discussion (Misc queries) 1 March 10th 05 05:17 PM
Previous Post - Correct Syntax Query Clarence Crow Excel Worksheet Functions 0 December 7th 04 05:35 AM


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