Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Specifing the active cell

How can I specify what the activecell is, If I try to select a new
range (see below) this doesn't seem to change the active cell
(according to activecell.rows)

Excel.Sheets("ALLIncidents").Range("A1")

Help???

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 225
Default Specifing the active cell

Your code doesn't select the range - you need to use

Excel.Sheets("ALLIncidents").Range("A1").Select

but first you also have to make sure that "ALLIncidents"
is the active sheet:
Excel.Sheets("ALLIncidents").Active

unless of course you know for certain that it is active - but
better safe than sorry..

As a general rule it's not usually necessary to select cells,
and it tend to make macros run slower (as well as possibly
confusing users by losing their initial selection). Instead
you can do things like:

Dim MyCell as Excel.Range
Set MyCell = Excel.Sheets("ALLIncidents").Range("A1")
MyCell.Value = "Hello, World!"


Andrew


wrote:
How can I specify what the activecell is, If I try to select a new
range (see below) this doesn't seem to change the active cell
(according to activecell.rows)

Excel.Sheets("ALLIncidents").Range("A1")

Help???


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
Row select mode to highlight active row of active cell Bart Fay[_2_] Excel Discussion (Misc queries) 0 May 11th 10 09:34 PM
Specifing Cells to Sum on Condition phuser[_2_] Excel Worksheet Functions 2 June 24th 08 11:39 PM
specifing colors in an excel chart keith Charts and Charting in Excel 2 May 28th 06 05:02 AM
manually specifing a range in the code below Neo[_2_] Excel Programming 1 May 26th 04 07:39 AM
specifing default folder with GetOpenFilename Brian Excel Programming 3 September 8th 03 01:55 PM


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