Macro Query

  • Thread starter Thread starter nc
  • Start date Start date
N

nc

When selecting a cell/column and aligning within macros,
one can see the the selction taking place. Is there a way
of making the selction invisible?
 
Yes, precede your code with

Application.ScreenUpdating = False

and set to True at the end.

It is also possible to write your code without selecting. For instance
instead of

Range("H10").Select
Selection.Value = "hello"

just code

Range("H10").Value = "hello"

or in a loop, instead of

Range("H10").Select
Do
Selection.Value = i
Activecell.Offset(1,0).Select
i=i+1
Loop Until Activecell.Value = ""

use

With Range("H10")
Do
.Cells(i,0).Value = i
i=i+1
Loop Until .Cells(i,0).Value = ""
End With

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top