Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
pk pk is offline
external usenet poster
 
Posts: 27
Default AutoSum button

Hello and help please!

In Excel XP, using VBA, is there a way to simulate a click
of the "AutoSum" button on the toolbar to insert a sum
formula into the current cell?

If so, can you supply example code to do it?

Thanks much in advance.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default AutoSum button

PK,

Try the following:

Application.CommandBars.FindControl(ID:=226).Contr ols(1).Execute
Application.CommandBars.FindControl(ID:=226).Contr ols(1).Execute

Yes, you need to execute it twice.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"pk" wrote in message
...
Hello and help please!

In Excel XP, using VBA, is there a way to simulate a click
of the "AutoSum" button on the toolbar to insert a sum
formula into the current cell?

If so, can you supply example code to do it?

Thanks much in advance.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autosum button Robert H[_2_] Excel Worksheet Functions 1 May 5th 07 09:23 PM
Autosum button performing subtotal rfIPS Excel Discussion (Misc queries) 1 November 1st 06 11:11 PM
Shortcut Keystroke for the AutoSum button or Sum function? L Lightner Excel Discussion (Misc queries) 2 July 19th 06 12:56 AM
How do I reinstall the autosum button? I cannot find it on Excel KC Excel Worksheet Functions 4 July 11th 06 04:40 PM
I need to renable autosum button Flint New Users to Excel 2 June 23rd 06 03:37 PM


All times are GMT +1. The time now is 12:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"