Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Lee Harris
 
Posts: n/a
Default Follow up to "Recalculate" problem

I have a workbook with several sheets in it, each one has a button which I
use to force recalculation of various things for a game based idea.

When I do Alt-F11 I see that I have the following code

Option Explicit
Private Sub CommandButton1_Click()
Application.Calculate
End Sub


but this appears under "VBAProject", "Microsoft Excel Objects" and then the
code is on each sheet that I have a button for, obviously

What I want to know is, can I retain the functionality I have BUT have it so
that if I press a button on say the "Solitaire" worksheet, it only
recalculates the stuff on that sheet

Actually the fact that the buttons recalculate all sheets is OK for all
buttons except one, so I guess what I really need is just a way to isolate
the one button on the one sheet, so that it only randomises/recalculates on
its own specific sheet

does that make sense?

tks in advance


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default Follow up to "Recalculate" problem

Option Explicit
Private Sub CommandButton1_Click()
Me.Calculate
End Sub

Since you're in a worksheet module, "Me" refers to that worksheet that owns the
code.

Lee Harris wrote:

I have a workbook with several sheets in it, each one has a button which I
use to force recalculation of various things for a game based idea.

When I do Alt-F11 I see that I have the following code

Option Explicit
Private Sub CommandButton1_Click()
Application.Calculate
End Sub

but this appears under "VBAProject", "Microsoft Excel Objects" and then the
code is on each sheet that I have a button for, obviously

What I want to know is, can I retain the functionality I have BUT have it so
that if I press a button on say the "Solitaire" worksheet, it only
recalculates the stuff on that sheet

Actually the fact that the buttons recalculate all sheets is OK for all
buttons except one, so I guess what I really need is just a way to isolate
the one button on the one sheet, so that it only randomises/recalculates on
its own specific sheet

does that make sense?

tks in advance


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Lee Harris
 
Posts: n/a
Default Follow up to "Recalculate" problem


"Dave Peterson" wrote in message
...
Option Explicit
Private Sub CommandButton1_Click()
Me.Calculate
End Sub

Since you're in a worksheet module, "Me" refers to that worksheet that
owns the
code.


thanks a lot!


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
Urgent Help Required on Excel Macro Problem Sachin Shah Excel Discussion (Misc queries) 1 August 17th 05 06:26 AM
Problem With Reference Update Egon Excel Worksheet Functions 17 July 16th 05 05:45 AM
Copy an Drag cell Formula Problem Nat Excel Discussion (Misc queries) 1 June 20th 05 03:24 PM
problem office assistant R.VENKATARAMAN Excel Discussion (Misc queries) 0 June 15th 05 06:22 AM
Freeze Pane problem in shared workbooks JM Excel Discussion (Misc queries) 1 February 1st 05 12:04 AM


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