Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21846

Run-time error '1004'.

$
0
0
Hi, need some pointers on how to resolve this issue, the message prompts when the excel report is generated half way.

Run-time error '1004'.
Application-defined or operation-defined error.

The debugger points to this line -> xlSheet.Range(x1) = "=IF(SUM" & xAddress & "= 0,"""" , Average" & xAddress & ")" when the error occurs.

PHP Code:

 x1 xlSheet.Cells(((NumberOfProcess) * 3) + 12 addRowcolInt).Address '(xRow * 4) + 12
 If xAddress = "" Then
 xlSheet.Range(x1) = 0
 Else
 xlSheet.Range(x1) = "=IF(SUM" & xAddress & "= 0,"""" , Average" & xAddress & ")"
 End If
 xlSheet.Range(x1).NumberFormat = "0.00%" 


Viewing all articles
Browse latest Browse all 21846

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>