#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Macro creation

I would need help on the following question:

How can i, create a macro to associate with a buton on a excel sheet, so
that every time i push it it sum one fixed value to a specific cell.
Increasing that cell value every time it is pushed.

Best Regards

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Macro creation

Sub move_up()
With Range("A1")
..Value = .Value + 1
End With
End Sub

Draw a button using the Forms Toolbar and right-click and "Assign Macro"

If you're not familiar with VBA and macros, see David McRitchie's site for
more on "getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

or Ron de De Bruin's site on where to store macros.

http://www.rondebruin.nl/code.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run or edit the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP
On Tue, 13 May 2008 20:08:01 -0700, Xavier
wrote:

I would need help on the following question:

How can i, create a macro to associate with a buton on a excel sheet, so
that every time i push it it sum one fixed value to a specific cell.
Increasing that cell value every time it is pushed.

Best Regards


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
Macro for Multiple Form Creation JB2010 Excel Discussion (Misc queries) 1 March 23rd 06 03:56 PM
Creation of macro with an example Jothirmaya Excel Discussion (Misc queries) 2 November 30th 05 12:10 AM
Creation of a Generic Macro Sondra Excel Worksheet Functions 1 September 13th 05 10:40 PM
Macro Creation Programming Cells Excel Discussion (Misc queries) 3 July 28th 05 06:07 PM
Auto number / macro creation Fiona Excel Discussion (Misc queries) 2 March 7th 05 07:05 AM


All times are GMT +1. The time now is 01:24 PM.

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

About Us

"It's about Microsoft Excel"