Class Notes (836,580)
Canada (509,856)
Psychology (2,093)
PSYC 100 (32)
Lecture

Sub CreateChip11111.docx

2 Pages
42 Views
Unlock Document

Department
Psychology
Course
PSYC 100
Professor
Catherine( Cathy) Rankin
Semester
Winter

Description
Sub CreateChip() Dim nMaxCol As Integer Dim nMaxRow As Integer Dim nCounter As Integer Dim shapeArray(1 To 200) As Shape Dim nColor(20) As Integer Dim nForeColor As Integer Dim arrColor() As Variant Dim locTop As Integer  ' 0­300 Dim locLeft As Integer ' 50 ­ 500 Dim nWidth As Integer ' 0 ­ 20 Dim nHeight As Integer ' 0 ­20 Dim defWidth As Integer ' 0 ­ 20 Dim defHeight As Integer ' 0 ­20 Dim i, j, k As Integer Dim nResult As Integer arrColor = Array(3, 8, 14, 15, 19, 20, 21, 23, 25, 28, 30, 31, 35, 37, 38, 46, 51, 52, 54, 61) nMaxCol = 10 nMaxRow = 20 nCounter = 1 defWidth = Cells(1, 1).Width * 3 defHeight = Cells(1, 1).Height * 2 For i = 1 To nMaxRow  nForeColor = arrColor(Int(Rnd(20) * 20))  For j = 1 To nMaxCol     Randomize     '­­­get position to paint shape     locTop = Int(Rnd(300) * 300)
More Less

Related notes for PSYC 100

Log In


OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit