Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Row select mode to highlight active row of active cell | Excel Discussion (Misc queries) | |||
Specifing Cells to Sum on Condition | Excel Worksheet Functions | |||
specifing colors in an excel chart | Charts and Charting in Excel | |||
manually specifing a range in the code below | Excel Programming | |||
specifing default folder with GetOpenFilename | Excel Programming |