I have a simple worksheet that doesn't contain alot (for now) only some headlines in the cells: A2,B2,C2
I have written a code string in Office 2007 which writes the used range address of of the sheet to the cell A1, but when I open the workbook in Excel 97 the codestring doesn't seem to work i just get the following error message:
Run-time error '1004:
Out of stack space
The code string is as follows:
Can this be fixed?Sheets("Sheet1").Cells(1, 1) = Sheets("Sheet1").UsedRange.Address
Or is there an alternative to the Usedrange.Addres code?
Please help.
/Freakazoid
Use:
Sheets("Sheet1").Cells(1, 1) = Sheets("Sheet1").Cells.SpecialCells(xlLastCell).Address
Regards,
Khaled Elshaer
www.BIMcentre.com
Remember To Do the Following....
- Thank those who have helped you by clicking the Star below their post.
- Mark your post SOLVED if it has been answered satisfactorily:
- Select Thread Tools (on top of your 1st post)
- Select Mark this thread as Solved
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks