Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Klick button for [F9] function

I'm a real amateur trying to learn. If you have an answer, please make it so
that it's understandable for me to perform solution.. Now heres what I want
to do:

I've made a simple random number function to pick winning numbers in a
lottery.. I would like to be able to perform the function of pressing F9
button, just by klicking a button in the worksheet.. How do I do that?!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 695
Default Klick button for [F9] function

Insert this in a regular module

Sub calcNow()
Calculate
End Sub

Insert a Formular-button and link to calcNow macro


"Espen Rostad" skrev:

I'm a real amateur trying to learn. If you have an answer, please make it so
that it's understandable for me to perform solution.. Now heres what I want
to do:

I've made a simple random number function to pick winning numbers in a
lottery.. I would like to be able to perform the function of pressing F9
button, just by klicking a button in the worksheet.. How do I do that?!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Klick button for [F9] function

There is a calculate now button under ToolsCustomizeCommandsTools that you
can drag to your Toolbar.

If you want a button "on the worksheet" go to ToolsCustomize and open the
Control Toolbox toolbar.

Select design mode then click on the Command Button and draw one on your sheet.

Right-click and "View Code"

You will get these two lines in a module

Private Sub CommandButton1_Click()

End Sub

Add Calculate between the lines to get this.

Private Sub CommandButton1_Click()
Calculate
End Sub

Close the module and exit design mode.

Click the button to calculate.


Gord Dibben MS Excel MVP

On Fri, 4 May 2007 03:57:01 -0700, Espen Rostad <Espen
wrote:

I'm a real amateur trying to learn. If you have an answer, please make it so
that it's understandable for me to perform solution.. Now heres what I want
to do:

I've made a simple random number function to pick winning numbers in a
lottery.. I would like to be able to perform the function of pressing F9
button, just by klicking a button in the worksheet.. How do I do that?!


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
Help with a function button within a cell AndersonGirl Excel Worksheet Functions 2 April 14th 06 09:26 PM
function button fx nvrockman Excel Discussion (Misc queries) 1 November 26th 05 07:12 PM
Excel function button Berro Excel Discussion (Misc queries) 1 November 23rd 05 04:17 PM
Sorting function button jmon Excel Worksheet Functions 1 October 24th 05 05:55 PM
open a function result with a button TUNGANA KURMA RAJU Excel Discussion (Misc queries) 0 October 17th 05 05:00 AM


All times are GMT +1. The time now is 06:14 AM.

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"