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

is there a way to create a button in your spreadsheet which completes a
single command. Ie add 3 to a cell over and over so it just keeps increasing
everytime you push the button
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 292
Default commands button

Sure.

Open the VB editor (Alt F11 or similar).
Menu Insert Module.
Paste this into the module:

Sub Add3()
Range("C14").Value = Range("C14").Value + 3
End Sub

Return to Excel.
Show the Forms toolbar if it's hidden (View menu).
Put a button from it onto the worksheet.
Rightclick the button.
Choose Assign Macro, assign Add3 to it.
Voila.

HTH. Best wishes Harald


"pts" skrev i melding
...
is there a way to create a button in your spreadsheet which completes a
single command. Ie add 3 to a cell over and over so it just keeps
increasing
everytime you push the button



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
Button commands or hyperlinks chat Excel Discussion (Misc queries) 4 November 6th 08 03:36 AM
command button commands to much Wanna Learn Excel Discussion (Misc queries) 1 October 27th 08 03:42 PM
DOS commands Taikoubo Excel Discussion (Misc queries) 0 March 30th 05 03:37 AM
Help with "if-then"/look up commands or what ever you think is best. [email protected] Excel Discussion (Misc queries) 2 March 16th 05 08:25 PM
MS DOS Commands nath Excel Programming 1 June 9th 04 02:22 PM


All times are GMT +1. The time now is 12:21 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"