var" means that the parameter is "pass by reference" not "pass by value" -- in other words, you need to supply a variable, not a constant. The event handler should be able to put true or false in the parameter and the caller should test this value to see whether or not the cell can in fact be...
Weigh any four against any other four.
Two cases:
If in balance, then the false ball is one of the remaining four (Case 1).
If not balance then the balls can be labelled H or L for possibly heavy or possibly light (Case 2).
Case1:
Weigh two of the remaining unknown balls against one unknown...
Sure. You can drop another command button, double-click and paste this code:
Private Sub CommandButton2_Click()
EscapeRequested = True
End Sub
BTW, you should re-name the buttons for better documentation. I left them as CommandButton1 and CommandButton2 for simplicity sake in the example.
Never say it can't be done. That's like waving a red flag in front of a bull.
One way is to use a user form to initiate the process.
1. Insert a new code module and paste this code:
Option Explicit
Public EscapeRequested As Boolean
Sub LongRunningJob()
Dim x As Integer
x = 1...
You have not defined any storage for the value you want to store/retrieve by the property "GlobalName"
Or to say it another way, the act of accessing the property "GlobalName" causes the function GetGlobalName to be invoked. Inside the function GetGlobalName you are accessing the property...
There is an add-in called CodeSmart from http://www.aivosto.com/codesmart/net.html that (if I remember correctly) has a syntax that can group any lines of code by means of a formatted comment pair.
When the fourth parameter is TRUE, the table must be sorted in ascending order (Column AA in this case).
If you sort your data correctly, you should see the correct result.
Excellent! I think your 5x5 is different from either of the two that I found. That makes at least three distinct ways to do a 5x5, and four distinct ways to do a 4x4.
Nice job on the 7x7. One typo: Line 10 s/b C7, not D7.
I still don't see any general solution, since all of the ones found...
Skie: Congratulations on finding a fourth way to do the 4x4. I had not seen that particular one before. (This is exactly why I posted the puzzle -- I want to find more solutions.)
However, I don't think your 5x5 is correct. Your line from 1 to 4 which passes thru both T and M also passes...
That's why it's such a tough puzzle.
There are three distinct solutions to the 4x4 and at least 2 to the 5x5.
Two of the 4x4 can scale up to 5x5.
I have not yet found a solution to 6x6. My hope is to find a solution that scales up to nxn. Theoretically, if a solution can be found that has...
Sorry monksnake, that doesn't look like a valid solution.
It's hard to see, but it looks like at least one dot is being visited more than once. For example, the first dot in the second row looks like it is on three different line segments. See previous post... Each dot must be visited once...
I'm surprised there are no takers on this one.
The problem also extends to 25 dots in a 5x5 square with 8 lines. (At least 2 distinct solutions. - Easily derived from two of the 4x4 solutions.)
I tried to find answers to the 4x4 with Google, but couldn't find any. Is it really possible that...
Next you will probably want to code some way to search/lookup data in your array.
Instead of using array/records, take a look at using TStringList/objects.
You can define your own object (essentially a record on steroids) to contain any type of data you need for one element, then add an...
I would write a macro. But assuming that is not what you are after, here is a non-macro approach:
1. Select the cell in the first column where you want one of the formulas.
2. Click the sum tool (Greek capital sigma = [Σ]) twice. That will insert a SUM formula.
3. Edit the formula...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.