>hi
>my problem is that I want an image to change randomly between 25 picz every time I press a button?
>
>how du I do?
You could store the file names in a string array and use the Rnd function to obtain a random element from it:
In Form_Load:
Dim aFiles(1 To 25) As String
aFiles(1) = "myfile1.txt"
aFiles(2) = "myfile2.txt"
aFiles(3) = "myfile3.txt"
'.. etc.
Randomize
In your command button's click:
sNextFile = aFiles(Int(25 * Rnd) + 1)
HTH