answersLogoWhite

0


Best Answer

um... i found this somewhere, i think it works. I use Java, so i dont know how it works. I think you can compile it in Microsoft Excel. (if you are a mac user, you wont be able to.

anyway, here it is:

Dim CX As Integer

Dim CY As Integer

Dim started As Boolean

Dim playerdead As Boolean

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If CX = 0 Then

CX = Cells(1, 1)

End If

If CY = 0 Then

CY = Cells(1, 2)

End If

If playerdead = True Then

Cells(CY, CX) = ""

playerdead = False

CX = Cells(1, 1)

CY = Cells(1, 2)

End If

If Target.Row = 2 Then

If Target.Column = 1 Then

If Cells(2, 1) = ">" Then

Cells(2, 1) = "ll"

ElseIf Cells(2, 1) = "ll" Then

Cells(2, 1) = ">"

Else

Cells(2, 1) = ">"

End If

End If

End If

If Cells(2, 1) = ">" Then Exit Sub

If Target.Row = CY - 1 Then

If Target.Borders(xlEdgeBottom).LineStyle > 0 Then

Cells(CY, CX).Select

ElseIf Cells(CY, CX).Borders(xlEdgeTop).LineStyle > 0 Then

Cells(CY, CX).Select

Else

Cells(CY, CX) = ""

CY = CY - 1

If Cells(CY, CX) = "F" Then

Cells(CY, CX) = "F"

CX = Cells(1, 1)

CY = Cells(1, 2)

Cells(2, 2) = "yippee!"

Cells(2, 2).Speak

ElseIf Cells(CY, CX) = "R" Then

Cells(CY, CX) = "R"

CX = Cells(CY, 1)

CY = Cells(CY, 2)

Cells(2, 2) = "poof!"

Cells(2, 2).Speak

ElseIf Cells(CY, CX) = "C" Then

Cells(CY, CX) = "C"

CY = Cells(2, CX)

CX = Cells(1, CX)

Cells(2, 2) = "poof!"

Cells(2, 2).Speak

End If

Cells(CY, CX) = "J"

End If

End If

If Target.Row = CY + 1 Then

If Target.Borders(xlEdgeTop).LineStyle > 0 Then

Cells(CY, CX).Select

ElseIf Cells(CY, CX).Borders(xlEdgeBottom).LineStyle > 0 Then

Cells(CY, CX).Select

Else

Cells(CY, CX) = ""

CY = CY + 1

If Cells(CY, CX) = "F" Then

Cells(CY, CX) = "F"

CX = Cells(1, 1)

CY = Cells(1, 2)

Cells(2, 2) = "yippee!"

Cells(2, 2).Speak

ElseIf Cells(CY, CX) = "R" Then

Cells(CY, CX) = "R"

CX = Cells(CY, 1)

CY = Cells(CY, 2)

Cells(2, 2) = "poof!"

Cells(2, 2).Speak

ElseIf Cells(CY, CX) = "C" Then

Cells(CY, CX) = "C"

CY = Cells(2, CX)

CX = Cells(1, CX)

Cells(2, 2) = "poof!"

Cells(2, 2).Speak

End If

Cells(CY, CX) = "J"

End If

End If

If Target.Column = CX + 1 Then

If Target.Borders(xlEdgeLeft).LineStyle > 0 Then

Cells(CY, CX).Select

ElseIf Cells(CY, CX).Borders(xlEdgeRight).LineStyle > 0 Then

Cells(CY, CX).Select

Else

Cells(CY, CX) = ""

CX = CX + 1

If Cells(CY, CX) = "F" Then

Cells(CY, CX) = "F"

CX = Cells(1, 1)

CY = Cells(1, 2)

Cells(2, 2) = "yippee!"

Cells(2, 2).Speak

ElseIf Cells(CY, CX) = "R" Then

Cells(CY, CX) = "R"

CX = Cells(CY, 1)

CY = Cells(CY, 2)

Cells(2, 2) = "poof!"

Cells(2, 2).Speak

ElseIf Cells(CY, CX) = "C" Then

Cells(CY, CX) = "C"

CY = Cells(2, CX)

CX = Cells(1, CX)

Cells(2, 2) = "poof!"

Cells(2, 2).Speak

End If

Cells(CY, CX) = "J"

End If

End If

If Target.Column = CX - 1 Then

If Target.Borders(xlEdgeRight).LineStyle > 0 Then

Cells(CY, CX).Select

ElseIf Cells(CY, CX).Borders(xlEdgeLeft).LineStyle > 0 Then

Cells(CY, CX).Select

Else

Cells(CY, CX) = ""

CX = CX - 1

If Cells(CY, CX) = "F" Then

Cells(CY, CX) = "F"

CX = Cells(1, 1)

CY = Cells(1, 2)

Cells(2, 2) = "yippee!"

Cells(2, 2).Speak

ElseIf Cells(CY, CX) = "R" Then

Cells(CY, CX) = "R"

CX = Cells(CY, 1)

CY = Cells(CY, 2)

Cells(2, 2) = "poof!"

Cells(2, 2).Speak

ElseIf Cells(CY, CX) = "C" Then

Cells(CY, CX) = "C"

CY = Cells(2, CX)

CX = Cells(1, CX)

Cells(2, 2) = "poof!"

Cells(2, 2).Speak

End If

Cells(CY, CX) = "J"

End If

End If

Cells(CY, CX).Select

If Cells(CY, CX).Font.Bold = True Then

playerdead = True

End If

If playerdead = True Then

Cells(CY, CX) = "N"

Cells(2, 2) = "ouch!"

Cells(2, 2).Speak

Else

Cells(CY, CX) = "J"

End If

End Sub

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Source code of Maze game in Visual Basic Net?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is a source code in Visual BASIC?

In Visual BASIC and other languages, source code refers to the code that you actually type when you are writing a program. Computers convert this code to machine code in order to be able to run the program.In Visual BASIC and other languages, source code refers to the code that you actually type when you are writing a program. Computers convert this code to machine code in order to be able to run the program.In Visual BASIC and other languages, source code refers to the code that you actually type when you are writing a program. Computers convert this code to machine code in order to be able to run the program.In Visual BASIC and other languages, source code refers to the code that you actually type when you are writing a program. Computers convert this code to machine code in order to be able to run the program.In Visual BASIC and other languages, source code refers to the code that you actually type when you are writing a program. Computers convert this code to machine code in order to be able to run the program.In Visual BASIC and other languages, source code refers to the code that you actually type when you are writing a program. Computers convert this code to machine code in order to be able to run the program.In Visual BASIC and other languages, source code refers to the code that you actually type when you are writing a program. Computers convert this code to machine code in order to be able to run the program.In Visual BASIC and other languages, source code refers to the code that you actually type when you are writing a program. Computers convert this code to machine code in order to be able to run the program.In Visual BASIC and other languages, source code refers to the code that you actually type when you are writing a program. Computers convert this code to machine code in order to be able to run the program.In Visual BASIC and other languages, source code refers to the code that you actually type when you are writing a program. Computers convert this code to machine code in order to be able to run the program.In Visual BASIC and other languages, source code refers to the code that you actually type when you are writing a program. Computers convert this code to machine code in order to be able to run the program.


What is a visual basic code?

Visual Basic code is a program or library that has been written using the Microsoft Visual Basic programming language.


How do you use or integrate c plus plus code in visual basic 6?

You can't integrate C++ source code directly into Visual Basic code. In order to make use of code written in another language, including C++, you must compile that source to produce a DLL. You can then link to that DLL via Visual Basic. The only caveat is that you must replace the C++ data types in the function declarations with the equivalent Visual Basic data types, such as 'Byte' for a C++ unsigned char, or 'Single' for a C++ float.


What is the mening of basic in visual basic?

Basic in Visual Basic stands for Beginner's All-purpose Symbolic Instruction Code.


How do you codify in excel?

Formulas can be written in cells. VBA code for Macros can be written by going into the Visual BASIC for Applications editor.Formulas can be written in cells. VBA code for Macros can be written by going into the Visual BASIC for Applications editor.Formulas can be written in cells. VBA code for Macros can be written by going into the Visual BASIC for Applications editor.Formulas can be written in cells. VBA code for Macros can be written by going into the Visual BASIC for Applications editor.Formulas can be written in cells. VBA code for Macros can be written by going into the Visual BASIC for Applications editor.Formulas can be written in cells. VBA code for Macros can be written by going into the Visual BASIC for Applications editor.Formulas can be written in cells. VBA code for Macros can be written by going into the Visual BASIC for Applications editor.Formulas can be written in cells. VBA code for Macros can be written by going into the Visual BASIC for Applications editor.Formulas can be written in cells. VBA code for Macros can be written by going into the Visual BASIC for Applications editor.Formulas can be written in cells. VBA code for Macros can be written by going into the Visual BASIC for Applications editor.Formulas can be written in cells. VBA code for Macros can be written by going into the Visual BASIC for Applications editor.


Abbreviation for the word 'basic' in visual basic?

Beginner's All-purpose Symbolic Instruction Code


Where can you find code for a Visual Basic Tic Tac Toe Game?

Answer - Visual Basic tic-tac-toe codeYou can find Visual Basic code for ic-tac-toe at John Smiley's website. (Link below.) John Smiley teaches programming-including Visual Basic-and has written a number of books, such as Learn to Program with Visual Basic 6. To get the tic-tac-toe code, you may go to his website. The link(s) are below. www.johnsmiley.com (main page)www.johnsmiley.com/ilovetohelp.htm(on this page, scoll down about to the middle of the page and look for the section entitled "Downloads and Sample Projects." It is the 2nd to last link in the section. There should be a link to download it.Answer:For all of your source code needs you should go to :( http://www.planet-source-code.com/ )Not only do they have visual basic source codes they also have lot's of other languages as well...I have been using planet source code for about 6 years now,it's never let me down they always have something your looking for...Now you don't have to sign up with them but you should its free,and if you don't sign up thers a 3-5 download limit per day I think cant remember the numbers exactly though...


Code for Secant method please in visual basic 2008?

855193


What is the code of cube root in visual basic?

x ^ (1 / 3)


The code for shutting down computer in visual basic?

The code is: shell ("shutdown -s") That code should work for you.


What does BASIC stand for in Visual Basic?

Beginner's All-Purpose Symbollic Instruction Code


Can Visual Basic 6.0 open a Visual Basic 5.0 project?

No, you will need to create a new project and add the code files to the new project. Yes, but you made need to make some changes to the code