Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveCell.Activate 1

Status
Not open for further replies.

WaterSprite

Technical User
Mar 23, 2004
69
US
My Code: I just run this with a loop 31 times. Works great.

[ActiveCell.Value = ActiveCell.Offset(0, -1) - ActiveCell.Offset(1, -1)]
[Activecell.Offset(1, 0).Activate]

My Question: It is suggested that we not use Activate, Select, etc as it slows our code down. I just do not know how else to move to the next cell below and have it become the active cell without using Activate.

And my spreadsheet is small, so speed is not a problem at this point, but I can see how something large would take a while with code written this way.
 
You cannot make a cell active any other way, but why do you want to make it active. What are you doing that requires it to be active? Being active is a facet of the UI, not the worksheet. Do whatever it is that you are doing directly to a Range set to the cell you want to work on.

Enjoy,
Tony

------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.

I'm working (slowly) on my own website
 
A starting point:
Code:
With ActiveSheet
  For r = startRow To startRow + 30
    .Cells(r, colNumber) = .Cells(r, colNumber - 1) - .Cells(r - 1, colNumber - 1)
  Next
End With

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top