Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hey everyone, I keep getting an error within my code and can't seem t solve the problem. If you could all check it out and let me know. Firs the code: Code ------------------- Option Explicit Public Function styrene() As Double Dim ExtCount As Integer, IntCount As Integer ExtCount = 7 While ExtCount <= 15 For IntCount = 17 To 21 Dim additivereactor As Integer additivereactor = ThisWorkbook.Worksheets("Input").Cells(IntCount, 4).Value Dim results As Integer results = ThisWorkbook.Worksheets("Calculations").Cells(19, ExtCount).Value If additivereactor = results Then styrene = ThisWorkbook.Worksheets("calculations").Cells((Int Count - 15), 6).Value + styrene Else styrene = styrene + 0 End If ThisWorkbook.Worksheets("Calculations").Cells(20, ExtCount).Value = styrene Next IntCount ExtCount = ExtCount + 1 Wend End Function ------------------- additivereactor and results are always integers. The error is this lin of code: Code ------------------- results = ThisWorkbook.Worksheets("Calculations").Cells(19, ExtCount).Value ------------------- Any help is appreciated. ~Jaso -- jclark41 ----------------------------------------------------------------------- jclark419's Profile: http://www.excelforum.com/member.php...fo&userid=2543 View this thread: http://www.excelforum.com/showthread.php?threadid=39057 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error dialog box meaning and how to find error | Excel Worksheet Functions | |||
how to find an error | Excel Discussion (Misc queries) | |||
help with this error-Compile error: cant find project or library | Excel Discussion (Misc queries) | |||
Error 2029 using Find XL 97 | Excel Programming | |||
Can' find error | Excel Programming |