Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Interface

Status
Not open for further replies.

HaydenMB

IS-IT--Management
May 30, 2003
24
GB
Hi,

I have a database that exports a recordset into a spreadsheet and I need to lock the cells that I have copied the recordset into.

I can lock the cells but I don't know how I select the range of the copied recordset to lock the cells. The number of records that is pasted into the spreadsheet varies so I can't lock a specific range, but the recordset is always copied into the same cell.

Does anybody know how I can get round this problem?Your help would be greatly appreciated.


Hayden
 
Could you not use RecordCount and pass the value to Excel so you can evaluate the range?

HTH
 
If you can't get the recordcount you could use the XL Special Cells option which will give you the last cell with data in or you could move through your primary key column until you find a row with no data.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top