Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / May 2008

Tip: Looking for answers? Try searching our database.

Macro creation

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Xavier - 14 May 2008 04:08 GMT
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
Gord Dibben - 14 May 2008 04:43 GMT
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 Insert>Module.  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 Tool>Macro>Macros.

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

Gord Dibben  MS Excel MVP

>I would need help on the following question:
>
[quoted text clipped - 3 lines]
>
>Best Regards
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.