Workbook clear on close

3 replies [Last post]
Gregm66
Offline
Last seen: 11 hours 38 min ago
Title: ★★★
Joined: 30 Apr 2016
Posts: 42
Hi everyone,

Is there any code to make a worksheet clear all textboxes when the workbook is closed. even if new data has been saved i would like it to open next time with no data in the 2 lists or data in the textboxes.

Thanks for any help in advance

mark_t
Offline
Last seen: 8 hours 19 min ago
Title: ★★★★
Joined: 26 Apr 2016
Posts: 90
It might be better instead to
It might be better instead to clear the data when the workbook is opened.

If you clear when the workbook is closed the cleared data might not be saved.

Write a macro to clear the data, then assign that macro to execute on workbook open even. Check under “Tools”, “Customise”, Events to find the workbook open event, then use the macro button to select your macro.

LibreOffice 5.1.3.2, Windows 8.1
Gregm66
Offline
Last seen: 11 hours 38 min ago
Title: ★★★
Joined: 30 Apr 2016
Posts: 42
hi mark_t thanks again for
hi mark_t

thanks again for your replies

the reason i want to clear on close is so that when the workbook is opened the user does not see their previous selection. all fields would be empty so that new selections could be made.

mark_t
Offline
Last seen: 8 hours 19 min ago
Title: ★★★★
Joined: 26 Apr 2016
Posts: 90
It would work the same if it
It would work the same if it clears on opening, the user still wouldn’t see the previous data.
LibreOffice 5.1.3.2, Windows 8.1

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.