litlmike

_Excel_RangeWrite

3 posts in this topic

Any ideas on how I diagnose the issue here?

 

Error creating the new workbook.

@error =3 

@extended = -214735267

I can provide code, but I doubt it will do much good.  Code runs in most situations, but there seems to be a random display of this error.  Please advise.

 

Local $iNumOfScienceLessonsForTheWholeSemester = 18
    Local $sTabToFindEnrollmentDate = "Start Here"
    Local $sRangeForEnrollmentDate = "AH5"
    Local $sRangeForNumberofLessonsExpected_Science = "G25"
    Local $sDateThatMustBeMetForEnrollmentSinceDayOne = "9/1/2015"
    Local $sWhatQuarterTabAreWeReadingFrom = "Quarter 1"

    Local $sSchoolEnrollmentDate = _Excel_RangeRead($oWorkbook, $sTabToFindEnrollmentDate, $sRangeForEnrollmentDate, 3)
    If $sSchoolEnrollmentDate = $sDateThatMustBeMetForEnrollmentSinceDayOne Then
        _Excel_RangeWrite($oWorkbook, $sExcelTabForCurrentMSPR, $iNumOfScienceLessonsForTheWholeSemester, $sRangeForNumberofLessonsExpected_Science)
    Else
        Local $iCountNumOfLessons
        ;This means they did not enroll at the beginning of the school year, so now we have to read from the ILP how many things were assigned
        Local $sCellRangeColumn = "N"
        Local $sCellRangeBegin = "13"
        Local $sCellRangeEnd = "57"
        For $iCC = $sCellRangeBegin To $sCellRangeEnd
            $sIsThereTextInThere = _Excel_RangeRead($oWorkbook, $sWhatQuarterTabAreWeReadingFrom, $sCellRangeColumn & $iCC)
            If $sIsThereTextInThere <> "" Then $iCountNumOfLessons += 1
        Next
        _Excel_RangeWrite($oWorkbook, $sExcelTabForCurrentMSPR, $iCountNumOfLessons, $sRangeForNumberofLessonsExpected_Science)
    EndIf

 

Share this post


Link to post
Share on other sites



You know that this errors are described in the help file?
Is this error returned from _Excel_BookNew or _Excel_RangeWrite?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now