wt.zip
I tried to use "sendkeys" for inserting "sum" formula to cell "A7",but it's failed.
Someone can give suggestion ? Thanks!
(I just want to simulate "ALT =" combination keys)
Sub test()
[a7].Select
Application.SendKeys ("%=")
End Sub
wt.zip
I tried to use "sendkeys" for inserting "sum" formula to cell "A7",but it's failed.
Someone can give suggestion ? Thanks!
(I just want to simulate "ALT =" combination keys)
Sub test()
[a7].Select
Application.SendKeys ("%=")
End Sub
Yes, I have a suggestion. Don't ever use SendKeys. It's buggy as...
Sent from my iPad using Tapatalk
Why not usePlease Login or Register to view this content.
Regards, TMS
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
i got it and just interested in it. Thanks!
Thanks!
In worksheet,using "Alt"+"=" will insert formula which sum the top continous cells ( cells count are dynamic).
This is useful .So i tried to simulate this in VBA.
Is there familiar methord? Thanks!
The following is a very simplistic simulation of what Alt-= does.
Please Login or Register to view this content.
With AutoSum (Alt-=), if there are no populated cells in the column or row of the Active Cell, you will simply get the formula =SUM() and have to select a range. If there are no populated cells above the Active Cell, it will SUM all the cells to the left. Otherwise it will SUM the cells above it.
I did consider trying to go for the full emulation but it's more complicated than it looks. Unfortunately, there are just too many considerations.
Regards, TMS
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks