Results 1 to 5 of 5

Thread: Sudoku Puzzle

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2005
    Posts
    56

    Sudoku Puzzle

    ive been asked to create a 4x4 sudoku puzzle and i have no idea where to start from could any of u brainy people help me out here plzzzz thanx

  2. #2
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: Sudoku Puzzle

    Do a search on

    http://www.planet-source-code.com/vb...t.asp?lngWId=1

    I've downloaded 4 of there.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  3. #3
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527

    Re: Sudoku Puzzle

    Here's a good place to start: (it's for 9x9 though)

    http://www.pro.or.jp/~fuji/sudoku/ma...doku01.html.en

  4. #4

    Thread Starter
    Member
    Join Date
    Oct 2005
    Posts
    56

    Re: Sudoku Puzzle

    Cool ive got it started but im having a lil problem with the code the thing is that ive got 4 combo boxes going across and ive got 4 going down and within the combo boxes ive got 4 numbers i think there 3,7,15, and 31. what i wanna do is i wanna do is the 4 combo boxes going across that needs to add up to 56 so everytime. if choose a number in the first combo box e.g. 15 and in the second combo box number 31 i wanna add that and put it in a text box. i hope i havent lost you but i'll add a picture of what i mean.
    and i'll also put the code in what ive done so far some will be wrong coz ive been trying out different methods but non of em work.

    Option Explicit
    Dim IntNums(4, 4) As Integer
    Dim i As Integer
    Dim intRow As Integer
    Dim intCol As Integer
    Private Function SumRow(intArray() As Integer, intRowNum As Integer) As Integer
    End Function
    Private Function SumCol(intArray() As Integer, intColNum As Integer) As Integer
    End Function


    Private Sub TransferInputToIntegerGrid(ByRef Grid() As Integer)



    End Sub

    Private Sub cmdSolve_Click()
    Call TransferInputToIntegerGrid(IntNums)
    End Sub

    Private Sub Form_Load()
    For i = 0 To 15
    Nums(i).AddItem ("5")
    Nums(i).AddItem ("7")
    Nums(i).AddItem ("15")
    Nums(i).AddItem ("31")

    Next i

    End Sub

    Private Sub Label1_Click()

    End Sub

    Private Sub lblAnswer_Click()

    End Sub

    Private Sub Nums_Change(Index As Integer)

    For intRow = 0 To 3
    For intCol = 0 To 3

    IntNums(intRow, intCol) = Val Nums(0).List


    End Sub

    Private Function SumRowSumRow(intArray() As Integer, intRowNum As Integer) As Integer

    For i = 0 To 3
    Sum = 0
    Sum = Sum + intArray(intRowNum, Col)
    Next
    SumRow = Sum

    End Function
    Attached Images Attached Images  

  5. #5

    Thread Starter
    Member
    Join Date
    Oct 2005
    Posts
    56

    Re: Sudoku Puzzle

    Any Ideas People?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width