Snedkeys "{F9}", true does not work

G

Guest

Hi all,

My cal mode is set to manual at start, so in code I use sendkeys
"{F9}",True, to force formula to calculate, but it failed until I press F9, I
also use "%^F9", neither work.Could you help me to fingure it out?

Clara
 
C

Chip Pearson

Clara,

You should avoid SendKey as much as you can. Instead, try some of the code
below:


Application.Calculate

Dim WS As Worksheet
Set WS = ActiveSheet
WS.Calculate

Dim Rng As Range
Set Rng = Range("A1:A100")
Rng.Calculate


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)
 

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

Top