Difference between revisions of "Microsoft KB Archive/103164"

From BetaArchive Wiki
(importing KB archive)
 
m (Text replacement - """ to """)
 
Line 62: Line 62:
 
<pre class="codesample">Sub AutoSum()
 
<pre class="codesample">Sub AutoSum()
 
     'This macro activates the AutoSum function on the active cell.
 
     'This macro activates the AutoSum function on the active cell.
     Application.SendKeys (&quot;%=~&quot;)
+
     Application.SendKeys ("%=~")
 
End Sub
 
End Sub
 
                 </pre>
 
                 </pre>
Line 70: Line 70:
 
<br />
 
<br />
  
<pre class="codesample">  A1:  =SEND.KEYS(&quot;%=&quot;)
+
<pre class="codesample">  A1:  =SEND.KEYS("%=")
   A2:  =SEND.KEYS(&quot;~&quot;)
+
   A2:  =SEND.KEYS("~")
 
   A3:  =RETURN()
 
   A3:  =RETURN()
 
                 </pre>
 
                 </pre>
Line 86: Line 86:
 
== REFERENCES ==
 
== REFERENCES ==
  
&quot;User's Guide 1,&quot; version 4.0, pages 152, 556<br />
+
"User's Guide 1," version 4.0, pages 152, 556<br />
&quot;Function Reference,&quot; version 4.0, page 385
+
"Function Reference," version 4.0, page 385
  
 
</div>
 
</div>

Latest revision as of 09:35, 20 July 2020

Article ID: 103164

Article Last Modified on 8/15/2005



APPLIES TO

  • Microsoft Excel 95 Standard Edition
  • Microsoft Excel 5.0c
  • Microsoft Excel 5.0 Standard Edition
  • Microsoft Excel 4.0a
  • Microsoft Excel 4.0 Standard Edition



This article was previously published under Q103164

SUMMARY

In Microsoft Excel, there is no macro function to emulate the behavior of the AutoSum tool. However, you can activate this tool from a macro by using the SEND.KEYS() function to send the appropriate keyboard shortcut (ALT+EQUAL SIGN (=)) to start the AutoSum tool.

MORE INFORMATION

Microsoft Excel version 5.0 and later

Microsoft provides examples of Visual Basic procedures for illustration only, without warranty either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. This Visual Basic procedure is provided 'as is' and Microsoft does not guarantee that it can be used in all situations. Microsoft does not support modifications of this procedure to suit customer requirements for a particular purpose.

Sub AutoSum()
    'This macro activates the AutoSum function on the active cell.
     Application.SendKeys ("%=~")
End Sub
                

Microsoft Excel 4.0

The following macro activates the AutoSum function in the active cell:

   A1:   =SEND.KEYS("%=")
   A2:   =SEND.KEYS("~")
   A3:   =RETURN()
                

Explanation of Above Macro

   A1:   Sends the AutoSum Keyboard Shortcut
   A2:   Sends the Enter Key
   A3:   Ends the macro
                

Microsoft provides macro examples for illustration only, without warranty either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

REFERENCES

"User's Guide 1," version 4.0, pages 152, 556
"Function Reference," version 4.0, page 385


Additional query words: 4.00a sum end row column formula Excel

Keywords: KB103164