Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 117,280 VB Programmers for FREE! Ask your question and get quick answers from experts. There are 2,031 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



Nevermind. Figured it out

 
Reply to this topicStart new topic

Nevermind. Figured it out

Izumi
post 17 Jun, 2008 - 06:09 AM
Post #1


D.I.C Head

**
Joined: 13 Mar, 2008
Posts: 83


My Contributions


Hello, I'm helping to a friend of mine to build a 16x16 sudoku in Excel using macroses. I've cleaned all her mistakes (at least the ones I managed to find), but there is one I have no idea what is wrong with it. Run time error 9. The MVB is marking me the following part:

CODE
safety(triallevel, safesquare) = square(horiz_l_a, horiz_s_a, vert_l_a, vert_s_a, possibility)


Those are defined with the following:

Dim horiz_l, horiz_s As Integer 'horizontal coordinates of the square
Dim vert_l, vert_s As Integer 'vertical coordinates
Dim possibility As Integer 'possibilities the square to be used in a loop/cicle/not sure for the word
Dim triallevel As Integer 'where we've reached with the attempts and the mistakes
Dim safety(1 To 100, 1 To 256) As Integer 'masiv for the matrices
Dim safesquare As Integer 'safe square

If someone is willing to help I can zip the file and upload it, so that you can have a look at both the excel and the MVB codes.

Thank you in advance,
Izu

This post has been edited by Izumi: 18 Jun, 2008 - 04:14 AM
User is offlineProfile CardPM

Go to the top of the page


Amadeus
post 17 Jun, 2008 - 09:16 AM
Post #2


g++ -o drink whiskey.cpp

Group Icon
Joined: 12 Jul, 2002
Posts: 11,886



Thanked 24 times

Dream Kudos: 25
My Contributions


We may need to see some code, but I can tell you this error usually occurs as a subscript out fo range error - but it can occur for a variety of reasons. the main ones are usually referencing a sheet that may not be available, or an array violation. Is there any more to the error message?

Can you provide the 5 lines of code that immediately precede the line marked as an error? Can we see the declaration of the variable named square? Have you checked all the values being supplied to the arrays?
User is offlineProfile CardPM

Go to the top of the page

Izumi
post 17 Jun, 2008 - 09:18 AM
Post #3


D.I.C Head

**
Joined: 13 Mar, 2008
Posts: 83


My Contributions


The error appears when I click on the button that calculates (the one that connects to the VB code). Give me a moment to write some explanations in English in the code and I'll upload the open source here.
User is offlineProfile CardPM

Go to the top of the page

Izumi
post 17 Jun, 2008 - 09:40 AM
Post #4


D.I.C Head

**
Joined: 13 Mar, 2008
Posts: 83


My Contributions


Figured it out whatsthat.gif;

This post has been edited by Izumi: 18 Jun, 2008 - 04:15 AM
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 10/6/08 10:39PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month