#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default HUGE macro

I'll take a look at this tonight. Usually these problems are when more that
one workbook is opened. the code is using Activeworkbook. Maybe this should
be changed to Thisworkbook (the book with the macro) rather than
actrtiveworkbook.

The other possibility it the range in the Pick_Um code doesn't specify a
worksheet. If D1 is 0 the code will not work (wrong workshet selected). You
are right the sort should be working which implies it is not reading the
value in D1 because the wrong worksheet is active.

Sub Pick_Um()

Select Case Range("D1").Value
Case 8
Call X_ON_X(4, 4)
Case 9
Call X_ON_X(5, 4)
Case 10
Call X_ON_X(5, 5)
Case 11
Call X_ON_X(6, 5)
Case 12
Call X_ON_X(6, 6)
Case 13
Call X_ON_X(7, 6)
Case 14
Call X_ON_X(7, 7)

End Select

End Sub

"project manager" wrote:

its not working at all??? its not sorting, copying or pasting???

i put a break in the first line and F8'ed it through...

just nothing



"joel" wrote:

I think in this case the select statement makes the code much easier to
understand. Reducing the number of lines of code really doesn't have any
advantage.

"Dana DeLouis" wrote:

Case 8
Call X_ON_X(4, 4)
Case 9
Call X_ON_X(5, 4)
Case 10
Call X_ON_X(5, 5)

Just an idea. If the op expands the number of inputs, does it follow
the same pattern?

x = CLng(Range("D1")) 'Make sure it's an integer
Select Case x
Case 8 To 14 ' or more...
Call X_ON_X((x + 1) \ 2, x \ 2)
Case Else
'??
End Select

= = =
Dana DeLouis

<snip

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble figuring out how to Loop through a huge repetitive macro Don M. Excel Programming 12 November 4th 08 01:08 AM
huge problem tomro1 Excel Discussion (Misc queries) 0 June 13th 06 09:30 AM
huge problem!!! tomro1[_9_] Excel Programming 0 June 12th 06 09:40 PM
A Huge Thank You! Zani Excel Programming 0 March 3rd 06 12:41 AM
huge huge excel file... why? Josh Excel Discussion (Misc queries) 12 February 9th 06 09:55 PM


All times are GMT +1. The time now is 04:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"