PC Review


Reply
Thread Tools Rate Thread

Bootstrapping in Excel

 
 
joshua.davis85@gmail.com
Guest
Posts: n/a
 
      5th Jul 2007
Hey guys,

I'm pretty much brand new to VBA and I'm trying to figure out how to
bootstrap in Excel and run around 10,000 simulations. I'd like to do
it without using @Risk or Monte Carlo.

I have a macro now that essentially simulates one set of data, copies
it into another cell, and repeats a specified amount of times. But
since the end of the macro tells it to rerun the macro, the macro
returns an "out of stack space" error after 188 simulations.

Is there any way to get around this or to run simulations in Excel
without using MC or @Risk?

 
Reply With Quote
 
 
 
 
david.ritchie.au@gmail.com
Guest
Posts: n/a
 
      5th Jul 2007
On Jul 6, 12:45 am, joshua.davi...@gmail.com wrote:
> Hey guys,
>
> I'm pretty much brand new to VBA and I'm trying to figure out how to
> bootstrap in Excel and run around 10,000 simulations. I'd like to do
> it without using @Risk or Monte Carlo.
>
> I have a macro now that essentially simulates one set of data, copies
> it into another cell, and repeats a specified amount of times. But
> since the end of the macro tells it to rerun the macro, the macro
> returns an "out of stack space" error after 188 simulations.
>
> Is there any way to get around this or to run simulations in Excel
> without using MC or @Risk?


Hi Joshua

Insert a new Module
Insert a procedure: call it DoMacro
Sub DoMacro
Dim iCount as long
For iCount 1 to 10000

Next

 
Reply With Quote
 
david.ritchie.au@gmail.com
Guest
Posts: n/a
 
      5th Jul 2007
On Jul 6, 12:45 am, joshua.davi...@gmail.com wrote:
> Hey guys,
>
> I'm pretty much brand new to VBA and I'm trying to figure out how to
> bootstrap in Excel and run around 10,000 simulations. I'd like to do
> it without using @Risk or Monte Carlo.
>
> I have a macro now that essentially simulates one set of data, copies
> it into another cell, and repeats a specified amount of times. But
> since the end of the macro tells it to rerun the macro, the macro
> returns an "out of stack space" error after 188 simulations.
>
> Is there any way to get around this or to run simulations in Excel
> without using MC or @Risk?


(let's try that again and don't bash the down arrow just cause iTunes
got stuck...)

Hi Joshua

In the VB editor:
Change your macro "yourMacro" so it doesn't call itself.

Double-click the 'ThisWorkbook' object
Drop the (General) combobox to show 'Workbook'
Drop the Procedure combobox to show 'Open'

Enter this code:

Dim iCount as long
For iCount = 1 to 10000
Call YourMacro
DoEvents
Next

Close and open your workbook to run the new macro

HTH
David

 
Reply With Quote
 
joshua.davis85@gmail.com
Guest
Posts: n/a
 
      5th Jul 2007
On Jul 5, 11:03 am, david.ritchie...@gmail.com wrote:
> On Jul 6, 12:45 am, joshua.davi...@gmail.com wrote:
>
> > Hey guys,

>
> > I'm pretty much brand new to VBA and I'm trying to figure out how to
> > bootstrap in Excel and run around 10,000 simulations. I'd like to do
> > it without using @Risk or Monte Carlo.

>
> > I have a macro now that essentially simulates one set of data, copies
> > it into another cell, and repeats a specified amount of times. But
> > since the end of the macro tells it to rerun the macro, the macro
> > returns an "out of stack space" error after 188 simulations.

>
> > Is there any way to get around this or to run simulations in Excel
> > without using MC or @Risk?

>
> (let's try that again and don't bash the down arrow just cause iTunes
> got stuck...)
>
> Hi Joshua
>
> In the VB editor:
> Change your macro "yourMacro" so it doesn't call itself.
>
> Double-click the 'ThisWorkbook' object
> Drop the (General) combobox to show 'Workbook'
> Drop the Procedure combobox to show 'Open'
>
> Enter this code:
>
> Dim iCount as long
> For iCount = 1 to 10000
> Call YourMacro
> DoEvents
> Next
>
> Close and open your workbook to run the new macro
>
> HTH
> David


Thanks a lot for the help, guys. It works now.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Paste failed in excel file migrated from Excel 2003 to Excel Handong Chen Microsoft Excel Crashes 1 4th Mar 2010 06:05 PM
Application coded in excel 2000 when used in excel 2003 excel doesnot perform well and takes double the time to give the output Prince Microsoft Excel Programming 4 17th Feb 2009 03:05 PM
Bootstrapping .NET 2.0 =?Utf-8?B?ZVNvbFRlYywgSW5jLiA1MDEoYykoMyk=?= Microsoft VB .NET 3 18th Oct 2006 03:05 AM
Need to Save Excel XML as just Excel file for user to open in Excel 2000 Fatmosh Microsoft Excel Programming 0 20th Sep 2005 05:37 PM
Excel 2003 crashes loading excel files created Excel 2000 =?Utf-8?B?SmVmZiBMZXdpbiAgQXVzdHJhbGlh?= Microsoft Excel Misc 0 27th Jun 2005 04:20 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:45 AM.