Hello,
When using copyfromrecordset to paste a DAO recordset into excel, how do null values- both string and numeric- get pasted? Are they pasted as blanks, empty, or as 0-length strings?
What I need to do is shade a particular row in if the pasted value is blank (so in the original query, the value was Null). So I tried to check if the cell is blank and then shade as follows:
This doesn't work- the rows where the totals are blank aren't being shaded. What are numeric Nulls pasted as?
Thank you in advance for your suggestions!
When using copyfromrecordset to paste a DAO recordset into excel, how do null values- both string and numeric- get pasted? Are they pasted as blanks, empty, or as 0-length strings?
What I need to do is shade a particular row in if the pasted value is blank (so in the original query, the value was Null). So I tried to check if the cell is blank and then shade as follows:
PHP:
If wb.sheets(currentsubtask).range(TOTALScol & header_OTPS + i).Value = Empty Then
'I also tried = blank, and = " " in the If statement above
With wb.sheets(currentsubtask).range(TOTALScol & header_OTPS + i).Interior
.ColorIndex = 2
.Pattern = xlGray16
.PatternColorIndex = xlAutomatic
End With
End If
This doesn't work- the rows where the totals are blank aren't being shaded. What are numeric Nulls pasted as?
Thank you in advance for your suggestions!
Last edited: