Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA code for Autosum command
I know I've used this before but I can't locate it. I'm
trying to find the VBA code for the Excel 'Autosum' command. I'm using Excel 2003. Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA code for Autosum command
This is one way to make Autosum run by code:
Sub DoAutoSum() Dim x As CommandBarControl Set x = CommandBars.FindControl(ID:=226) If Val(Application.Version) 9 Then _ Set x = x.Controls(1) x.Execute 'AutoSum If Selection.Cells.Count = 1 Then x.Execute 'Again to exit edit mode End If End Sub Here's another: Sub DoAutoSumWithSendKeys() SendKeys "%={Enter}" End Sub -- Jim Rech Excel MVP "Michelle" wrote in message ... |I know I've used this before but I can't locate it. I'm | trying to find the VBA code for the Excel 'Autosum' | command. I'm using Excel 2003. | Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How 2 sort an autosum total list after adding items 2 autosum item | Excel Discussion (Misc queries) | |||
Command code | Excel Discussion (Misc queries) | |||
command code ( GOTO command) in formula | New Users to Excel | |||
Macro code to autosum a dynamic length column | Excel Discussion (Misc queries) | |||
Command Button VBA code | Excel Discussion (Misc queries) |