Macro Doesn't Run Automatically

matthewlouis

Active Member
Joined
Mar 28, 2014
Messages
374
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Several months ago, I had some help creating the following macro.

Sub clicky()
For t = 1 To 100
Application.Calculate
Range("J10").Value = Range("J10").Value + 1
If Range("F11").Value <= 0.8 Then Range("J12").Value = Range("J12").Value + 1
Debug.Print t & ":" & Range("F11")
MsgBox t
Next t
End Sub

The macro works well except for one thing. It doesn't run automatically. When I hit CTRL-Shift-C, I want it to run the macro automatically 100 times. However, I am having to hit the Esc button each time to run ONE simulation, or 100 times to complete it. Am I missing a line in the code? I circled back to the person who helped write this code but I never heard back from him . . . it's been 3 months . . . so I hope the moderators understand this isn't a re-post.

Thanks in advance!


Several months ago, I had some help
 
J12 is the Failures calculated by:

1. When 300 simulations run, 77% of 300 is 232 Successful.

2. 300 - 232 = 68 Failures
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
@matthewlouis imo it would be best to upload your workbook to a file share facility on the net like DropBox or WeTransfer and to provide a link in this thread so we're able to have a closer look.
 
Upvote 0
@matthewlouis imo it would be best to upload your workbook to a file share facility on the net like DropBox or WeTransfer and to provide a link in this thread so we're able to have a closer look.
Very true. Even the answers to our questions are cryptical.
 
Upvote 0
Guys, I apologize. I have uploaded workbooks before but I will have to familiarize myself (again) with the xl2BB process to load my workbook on here.

Thanks for ALL your help, so to be sorry to be so frustrating and cryptic, you're right, you must see the workbook, I get it. I just thought getting it to automate would be simpler.
 
Upvote 0
@Zyndstoff
Please do not ask for files to be shared privately, as it is against board policy.
All communication (including sharing files) must remain on the board.
Thanks
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,378
Members
448,955
Latest member
BatCoder

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top