Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Auto recalculate?
I have a nifty sheet that does some automated play calling for a game, and
it works fine if I just select a cell (empty one) and hit delete - it re-randomises and picks a play however, I tried adding a button and code to make it a clickable button, but it doesn't seem to work. In addition, I cannot even remember how I added the button or code (I got into VBA with Alt-F11 but am not sure how I linked the code to the button, or whether somethings gone wrong) I have other files with the same clickable button and exactly the same code and it works fine. If possible I would also like to be able to have a button on a separate tab in the same file also randomising everything via the same recalculate method if I can do that.. any help greatly appreciated. Can send file too if you like, only 53 KB zipped up. Private Sub CommandButton1_Click() Calculate End Sub |
#2
|
|||
|
|||
Auto recalculate?
Try F9.
Tim C "Lee Harris" wrote in message ... I have a nifty sheet that does some automated play calling for a game, and it works fine if I just select a cell (empty one) and hit delete - it re-randomises and picks a play however, I tried adding a button and code to make it a clickable button, but it doesn't seem to work. In addition, I cannot even remember how I added the button or code (I got into VBA with Alt-F11 but am not sure how I linked the code to the button, or whether somethings gone wrong) I have other files with the same clickable button and exactly the same code and it works fine. If possible I would also like to be able to have a button on a separate tab in the same file also randomising everything via the same recalculate method if I can do that.. any help greatly appreciated. Can send file too if you like, only 53 KB zipped up. Private Sub CommandButton1_Click() Calculate End Sub |
#3
|
|||
|
|||
Auto recalculate?
"Tim C" wrote in message ... Try F9. Tim C what does F9 do? I need it to be a button because I'm sending this sheet to someone else and want it to look nice. "Lee Harris" wrote in message ... I have a nifty sheet that does some automated play calling for a game, and it works fine if I just select a cell (empty one) and hit delete - it re-randomises and picks a play however, I tried adding a button and code to make it a clickable button, but it doesn't seem to work. In addition, I cannot even remember how I added the button or code (I got into VBA with Alt-F11 but am not sure how I linked the code to the button, or whether somethings gone wrong) I have other files with the same clickable button and exactly the same code and it works fine. If possible I would also like to be able to have a button on a separate tab in the same file also randomising everything via the same recalculate method if I can do that.. any help greatly appreciated. Can send file too if you like, only 53 KB zipped up. Private Sub CommandButton1_Click() Calculate End Sub |
#4
|
|||
|
|||
Auto recalculate?
Try:
Option Explicit Private Sub CommandButton1_Click() Application.Calculate End Sub Since the code is under the worksheet and Calculate is not qualified by anything, excel assumes you want just that worksheet calcuated. The same as typing: worksheets("sheet1").calculate or behind the worksheet: me.calculate Lee Harris wrote: I have a nifty sheet that does some automated play calling for a game, and it works fine if I just select a cell (empty one) and hit delete - it re-randomises and picks a play however, I tried adding a button and code to make it a clickable button, but it doesn't seem to work. In addition, I cannot even remember how I added the button or code (I got into VBA with Alt-F11 but am not sure how I linked the code to the button, or whether somethings gone wrong) I have other files with the same clickable button and exactly the same code and it works fine. If possible I would also like to be able to have a button on a separate tab in the same file also randomising everything via the same recalculate method if I can do that.. any help greatly appreciated. Can send file too if you like, only 53 KB zipped up. Private Sub CommandButton1_Click() Calculate End Sub -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto Protecting cells & auto filling date | Excel Discussion (Misc queries) | |||
Averaging Values in Auto Filter | Excel Worksheet Functions | |||
AUTO SUM | Excel Discussion (Misc queries) | |||
excel links update not working in auto, calculations in auto | Excel Worksheet Functions | |||
Why can't my macro use Auto Filter when I told the Sheet Protecti. | Excel Worksheet Functions |