VB School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a VB Expert!

Join 300,489 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,809 people online right now. Registration is fast and FREE... Join Now!




Nevermind. Figured it out

 

Nevermind. Figured it out

Izumi

17 Jun, 2008 - 05: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 - 03:14 AM

User is offlineProfile CardPM
+Quote Post


Amadeus

RE: Nevermind. Figured It Out

17 Jun, 2008 - 08:16 AM
Post #2

g++ -o drink whiskey.cpp
Group Icon

Joined: 12 Jul, 2002
Posts: 13,260



Thanked: 147 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
+Quote Post

Izumi

RE: Nevermind. Figured It Out

17 Jun, 2008 - 08: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
+Quote Post

Izumi

RE: Nevermind. Figured It Out

17 Jun, 2008 - 08: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 - 03:15 AM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/8/09 04:14AM

Live VB Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month