Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I sould put the code in what event

Status
Not open for further replies.

jslmvl

Vendor
Jan 26, 2008
268
GB
Hi,

I need to put code
W = W/n/m
into my usercontrol, W, n and m are the usercontrol's properties.
When I put the code in
Sub UserControl_Initialize()
I got divide by zero error. I sould put the code in what event?
 
I have never seen this syntax used in Visual Basic 5 or 6 before. The compiler is trying to divide W by n by m (whatever W, n, and m are). You will get the divide by zero error no matter where you put the code. What exactly are the properties you are trying to set, and what is "usercontrol"? A text box, command button, etc.

An làmb a bheir, ‘s i a gheibh.
 
Well, User Control is a control but made by yourself not from MS.
 
W = W/n/m" is meaningless without some sort of context to put it in. What sre w, n, and m? What values are stored there? What properties are you trying to set? What does your control do?

An làmb a bheir, ‘s i a gheibh.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top