Picname, when used in the AddObject statement, is a string variable
containing the values pic1, pic2, pic3, ... pic15.

Picname, in the statement picName.ScaleMode = 3, is not the object that
AddObject created. It's still just a string. The objects created are
pic1, pic2, pic3, ... pic15.

You could do pic1.ScaleMode = 3 after the first AddObject is done, however.

>Why do I get the Error ...
>
>" Microsoft VBScript runtime error line 95 char 0 
>Object required "pic1"
>
>Here is the code
>
>For I = 1 To 15
>   If I <= 5 Then
>   X = 70
>   Y = 75 + ((I-1)*70) 
>   End If
>   If (I > 5) And (I <=10) Then
>   X = 250
>   Y = 75 + ((I-6)*70) 
>   End If   
>   If (I > 10) And (I <=15) Then
>   X = 250
>   Y = 75 + ((I-11)*70) 
>   End If 
>   picName = "pic" & CStr(I)     
>AddObject "NSCEPictureBox.NSCEPictureBoxCtrl.1",picName,X,Y,220,50
>picName.ScaleMode = 3 ' pixels
>picName.BorderStyle = 0 ' none
>picName.Picture = DrlB(I)
>Next
>
>What am I missing?
>
>Thanks
>Ben
>
>
>
>
>------------------------------------
>
>Yahoo! Groups Links
>
>
>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nsb-ce" group.
To post to this group, send email to nsb-ce@googlegroups.com
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to