Loop - export Excel

  • Thread starter Thread starter learning_codes
  • Start date Start date
L

learning_codes

Hi,

I have 50 spreadsheets that have one worksheet. I have all the data
in each spreadsheet but only first (1 of 50) has the lines. This is
what I want but I am not able to get all next 49 spreadsheet does not
have the lines.

Can you help me and how to create all the spreadsheets that have
lines?

Your help would be much appreciated.

Here is the code below:


'*********************************************************************
For Each cell In Range("A4", Range("A65536").End(xlUp))
If cell.Value > "" Then
With Range(cell, cell.Offset(0, 9))

With .Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With

End With

End If
Next
 
First of all, that is only a snippet from the entire code, so there's no way
that we can see how this would relate to an Access export. I suspect that
you'd be better off asking this in an Excel newsgroup anyway, since all the
code below is Excel VBA.
 
Back
Top