Microsoft
Software
Hardware
Network
Question : Run-time error '6' Overflow
I have currently taken over support of a tool written in Visual Basic 6. Trying to feel my way thru the code right now. However the business user I support need a issue resolved quickly with a report he is running. When the user clicks on the report ,a message pops up -> run-time error '6'; Overflow and the application exits.
I just tried to debug to find where exactly the error is occurring and a snippet of code (4 lines) is given below..
Load frmActualProjectedResource
.lblContro
l(iCount)
frmActualProjectedResource
.lblContro
l(iCount).
TOP = frmActualProjectedResource
.iTopBASE + (240 * iCount)
frmActualProjectedResource
.lblContro
l(iCount).
Caption = frmActualProjectedResource
.lstContro
ls.List(0)
& " "
frmActualProjectedResource
.lblContro
l(iCount).
Visible = True
The OVERFLOW error occurs on the line that is BOLD. In debug mode I see that the value in iCount=130 & value in "frmActualProjectedResourc
e.iTopBASE
" equals 1800.
I do not see any data type in there so that I can quickly troubleshoot. I am still learning my way with VB6 and I am not sure why the error is occurring at that statement. Any help is appreciated ?
Answer : Run-time error '6' Overflow
This will work for you:
frmActualProjectedResource
.lblContro
l(iCount).
TOP = frmActualProjectedResource
.iTopBASE + CSng(240 * iCount)
Good luck.
Random Solutions
Home drive showing root share instead of user share
Logon script that will copy the registry from a server share to local machine, then log user off
Move Mailbox from Exchange 2003 to Exchange 2010
Force MsgBox popup when users are logged into XP
Windows 2008 SP2 & Exchange 2007 CCR failover did not work properly
Me.BindingContext(Me.MEMTb
SQLDataSet
1, "MEMTb").AddNew() - AddNew not working
SQL SERVER 2008 - Use a Variable as a Column Name
password protected visual basic code for access database
Windows Server 2008 to Server 2008 R2 Upgrade
Is there any way to restrict WHERE users can have access to OWA (Exchange 2007)?