J
Jack
Hi,
I am exporting records from access to an excel sheet. The following is a
part of my code:
Set xlc = xls.Range("A1") ' this is the first cell into which data go
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("ExcelExp", dbOpenDynaset, dbReadOnly)
If rst.EOF = False And rst.BOF = False Then
rst.MoveFirst
If blnHeaderRow = True Then
For lngColumn = 0 To rst.Fields.Count - 1
xlc.Offset(0, lngColumn).Value = rst.Fields(lngColumn).Name
xlc.Offset(0, lngColumn).Locked
Next lngColumn
Set xlc = xlc.Offset(1, 0)
End If
However the code to lock each of the header cell is not working. I would
appreciate any help for resolution of the above issue. Also how does one make
the backcolor yellow for each of the header cell in the above process.
Thanks.
I am exporting records from access to an excel sheet. The following is a
part of my code:
Set xlc = xls.Range("A1") ' this is the first cell into which data go
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("ExcelExp", dbOpenDynaset, dbReadOnly)
If rst.EOF = False And rst.BOF = False Then
rst.MoveFirst
If blnHeaderRow = True Then
For lngColumn = 0 To rst.Fields.Count - 1
xlc.Offset(0, lngColumn).Value = rst.Fields(lngColumn).Name
xlc.Offset(0, lngColumn).Locked
Next lngColumn
Set xlc = xlc.Offset(1, 0)
End If
However the code to lock each of the header cell is not working. I would
appreciate any help for resolution of the above issue. Also how does one make
the backcolor yellow for each of the header cell in the above process.
Thanks.