• Log in or sign up for an account here: https://www.sythe.org/login

a few questions that i cannot find solutions too

  • Thread starter Thread starter kevinak
  • Start date Start date
K

kevinak

Guest
So i used to work with vb 6 and have to work with it for a class. I got tired of it so i got VB2008. Making things short. I need a little help..

First is there anyway i can set a single picturebox and thur code, load different pictures into it? I'm not quite sure how.

How do i pull data from a excel spread sheet? Can you explain it in simple terms?

Also, what's the code for making a var = a random integer?

Oh and is there any way to keep a frame or "groupbox" from falling into another one when placed over top of it?
 
How do i pull data from a excel spread sheet? Can you explain it in simple terms?

This peice of code will open a file and put the contents of the file into a string:
Code:
Public Function LoadFile(sLocation As String) As String
    Dim fFile As Integer
    fFile = FreeFile
    Open sLocation For Input As fFile
        LoadFile = Input(LOF(fFile), fFile)
    Close fFile
End Function

Usage:
Code:
dim strExcelFile as string
strexcelfile = loadfile("C:/penis.xcl")

Also, what's the code for making a var = a random integer?

Code:
dim intNumber as integer
randomize
intnumber = int(rnd * 9999)

Oh and is there any way to keep a frame or "groupbox" from falling into another one when placed over top of it?

Simply draw your first frame onto your form, then copy and paste it onto the form again, just make SURE you click on the form and select paste.
 
Runescape Gamblingrunescape gambling
Back
Top