View Single Post
  #12  
Old 10-31-2007, 12:24 PM
Troll_Inc Troll_Inc is offline
Senior Member
 
Join Date: Mar 2006
Location: FGHIJKLM STUVWXYZ
Posts: 2,566
Default Re: Random picking of hands from a database

[ QUOTE ]
[ QUOTE ]
OK, that .pdf totally worked.
A+++++


But I'd like to do this 30-40 times.
So I tried to make it a macro.
Write the results to column D (starting at cell D11).
Then insert a column so that it moves to the right and I can repeat.

This line is given as an error in my macro:
Application.Run "ATPVBAEN.XLA!Sample", ,ActiveSheet.Range("$D$11"), "R" _, 1000, True

I get Runtime Error 1004.
ATPVBAEN.XLA could no be found.

So it works onetime, but not in a macro...oh well beggars can't be choosers!

***********************
Sub Sampling1()
'
' Sampling1 Macro
' Macro recorded 10/30/2007 by wks46
'
' Keyboard Shortcut: Ctrl+s
'
Application.Run "ATPVBAEN.XLA!Sample", , ActiveSheet.Range("$D$11"), "R" _
, 1000, True
End Sub

[/ QUOTE ]
Did you also make sure that you installed the "Analysis ToolPak VBA" (see: http://www.cpearson.com/excel/ATP.htm ).

If it's not that then I'm not really sure (I'm afraid I don't know much about excel macros).

Juk [img]/images/graemlins/smile.gif[/img]

[/ QUOTE ]

Yeah, I have it installed and I have more simply macros already working.

Thanks for your help, but I might beto the point where it might be easier just to do the rest by hand. (Unless there is an Excel macro guru on here.)
Reply With Quote