Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Hi Secret Squirrel, The code below is what I used. This code is placed in "This Workbook". After you complete data entry, close the workbook and reopen it, it should erase your data automatically. Change sheet name as needed. This code doesn't need a button. Code: -------------------- Private Sub Workbook_Open() Dim ToErase As Range, EraseRows As Integer Set ToErase = Sheets("Sheet1").UsedRange EraseRows = ToErase.Rows.Count - 1 If EraseRows 0 Then Set ToErase = ToErase.Offset(1, 0).Range("1:" & EraseRows) ToErase.ClearContents End If End Sub -------------------- Larry -- keithl816 ------------------------------------------------------------------------ keithl816's Profile: http://www.excelforum.com/member.php...o&userid=21287 View this thread: http://www.excelforum.com/showthread...hreadid=474422 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Financial modelling from Excel to Access | Excel Discussion (Misc queries) | |||
Access Excel Linked Text and Number Issues | Excel Discussion (Misc queries) | |||
export access to excel. change access & update excel at same time | Excel Discussion (Misc queries) | |||
Send Excel data to Access through button | Excel Discussion (Misc queries) | |||
Excel user desires to learn ABC of Access | Excel Discussion (Misc queries) |