Two Plus Two Newer Archives

Two Plus Two Newer Archives (http://archives1.twoplustwo.com/index.php)
-   Software (http://archives1.twoplustwo.com/forumdisplay.php?f=47)
-   -   Random picking of hands from a database (http://archives1.twoplustwo.com/showthread.php?t=534791)

jukofyork 10-30-2007 11:36 PM

Re: Random picking of hands from a database
 
[ 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]

Troll_Inc 10-31-2007 12:24 PM

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.)


All times are GMT -4. The time now is 08:00 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.