none
An unhandled exception of type 'System.StackOverflowException' occurred in System.Windows.Forms.dll RRS feed

Answers

All replies

  • Hi

    Put a BreakPoint on that line and examine the val1 and val2 values - maybe the product of the multiplication exceeds the maximum Double value.



    Regards Les, Livingston, Scotland


    • Edited by leshay Wednesday, September 19, 2018 11:58 AM
    Wednesday, September 19, 2018 11:56 AM
  • I tried as you said but the problem is occurring on that line which is marked above. 
    Wednesday, September 19, 2018 12:08 PM
  • Try adding the next line before Try:

       If e.ColumnIndex = 7 Then Return


    • Marked as answer by kachani_anil Wednesday, September 19, 2018 3:47 PM
    Wednesday, September 19, 2018 12:23 PM
  • Since this is a stackoverflow an event is being entered recursively so you need to handle stopping that event from reentry, perhaps you can indicate which events are hooked up.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Wednesday, September 19, 2018 12:29 PM
    Moderator
  • You are handling the CellValueChanged event and then changing a cell value within that event handler.  So every time you set .cells(7).Value it causes the event handling code to execute again.  This event handler code should first check which cell value has changed, and then only do its work if the cell index is 5 or 6... any other cell value change should simply exit the event handler.

    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    Wednesday, September 19, 2018 1:38 PM
    Moderator
  • Thanks a lot it works now.
    Wednesday, September 19, 2018 3:47 PM