I have code in access vba to export data to excel. If certain cells are blank in each worksheet, I want the sheet hidden in excel. With my code below, it only appears to be evaluating the first cell in my range. Any thoughts?
For Each objws In objwb.Worksheets
objws.Activate
ActiveSheet.Range("A5,A18,A49,A64,A77,A115,A130,A143,A177,A192,A205,A249").Select
MsgBox Selection
If IsEmpty(Selection) Then
objws.Visible = False
End If
Next objws
For Each objws In objwb.Worksheets
objws.Activate
ActiveSheet.Range("A5,A18,A49,A64,A77,A115,A130,A143,A177,A192,A205,A249").Select
MsgBox Selection
If IsEmpty(Selection) Then
objws.Visible = False
End If
Next objws