Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I can reset all cells with a macro, but the form tools, such as my listbox and my combobox stay in a previous state. Help would be much appreciated.
|
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Friday, December 7, 2012 10:19:28 AM UTC-6, wrote:
I can reset all cells with a macro, but the form tools, such as my listbox and my combobox stay in a previous state. Help would be much appreciated. Sub Submit1() Application.ScreenUpdating = False Sht0 = "Form" Shtf = "Database" Shtc = "Setup" uf = Sheets(Shtf).Range("A65536").End(xlUp).Row + 1 For j1 = 23 To 32 If Sheets(Sht0).Cells(j1, 4) = "" Then Exit For Sheets(Shtf).Cells(uf, 1) = Sheets(Sht0).Cells(5, 5) Sheets(Shtf).Cells(uf, 2) = Sheets(Sht0).Cells(7, 5) Sheets(Shtf).Cells(uf, 3) = Sheets(Sht0).Cells(9, 5) Sheets(Shtf).Cells(uf, 4) = Sheets(Shtc).Cells(2, 2) Sheets(Shtf).Cells(uf, 5) = Sheets(Shtc).Cells(2, 3) Sheets(Shtf).Cells(uf, 6) = Sheets(Shtc).Cells(2, 1) Sheets(Shtf).Cells(uf, 7) = Sheets(Shtc).Cells(2, 4) Sheets(Shtf).Cells(uf, 8) = Sheets(Sht0).Cells(15, 12) Sheets(Shtf).Cells(uf, 9) = Sheets(Sht0).Cells(15, 16) Sheets(Shtf).Cells(uf, 10) = Sheets(Sht0).Cells(15, 15) Sheets(Shtf).Cells(uf, 11) = Sheets(Sht0).Cells(17, 11) Sheets(Shtf).Cells(uf, 12) = Sheets(Sht0).Cells(j1, 4) Sheets(Shtf).Cells(uf, 13) = Sheets(Sht0).Cells(j1, 5) Sheets(Shtf).Cells(uf, 14) = Sheets(Sht0).Cells(j1, 6) Sheets(Shtf).Cells(uf, 15) = Sheets(Sht0).Cells(j1, 7) Sheets(Shtf).Cells(uf, 16) = Sheets(Sht0).Cells(j1, 11) Sheets(Shtf).Cells(uf, 17) = Sheets(Sht0).Cells(j1, 12) Sheets(Shtf).Cells(uf, 18) = Sheets(Sht0).Cells(j1, 13) Sheets(Shtf).Cells(uf, 19) = Sheets(Sht0).Cells(j1, 14) Sheets(Shtf).Cells(uf, 20) = Sheets(Sht0).Cells(j1, 15) uf = uf + 1 ux = ux + 1 Next j1 Sheets(Sht0).Range("Clear").ClearContents Application.ScreenUpdating = True End Sub |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Friday, December 7, 2012 10:19:28 AM UTC-6, wrote:
I can reset all cells with a macro, but the form tools, such as my listbox and my combobox stay in a previous state. Help would be much appreciated. Sub Submit1() Application.ScreenUpdating = False Sht0 = "Form" Shtf = "Database" Shtc = "Setup" uf = Sheets(Shtf).Range("A65536").End(xlUp).Row + 1 For j1 = 23 To 32 If Sheets(Sht0).Cells(j1, 4) = "" Then Exit For Sheets(Shtf).Cells(uf, 1) = Sheets(Sht0).Cells(5, 5) Sheets(Shtf).Cells(uf, 2) = Sheets(Sht0).Cells(7, 5) Sheets(Shtf).Cells(uf, 3) = Sheets(Sht0).Cells(9, 5) Sheets(Shtf).Cells(uf, 4) = Sheets(Shtc).Cells(2, 2) Sheets(Shtf).Cells(uf, 5) = Sheets(Shtc).Cells(2, 3) Sheets(Shtf).Cells(uf, 6) = Sheets(Shtc).Cells(2, 1) Sheets(Shtf).Cells(uf, 7) = Sheets(Shtc).Cells(2, 4) Sheets(Shtf).Cells(uf, 8) = Sheets(Sht0).Cells(15, 12) Sheets(Shtf).Cells(uf, 9) = Sheets(Sht0).Cells(15, 16) Sheets(Shtf).Cells(uf, 10) = Sheets(Sht0).Cells(15, 15) Sheets(Shtf).Cells(uf, 11) = Sheets(Sht0).Cells(17, 11) Sheets(Shtf).Cells(uf, 12) = Sheets(Sht0).Cells(j1, 4) Sheets(Shtf).Cells(uf, 13) = Sheets(Sht0).Cells(j1, 5) Sheets(Shtf).Cells(uf, 14) = Sheets(Sht0).Cells(j1, 6) Sheets(Shtf).Cells(uf, 15) = Sheets(Sht0).Cells(j1, 7) Sheets(Shtf).Cells(uf, 16) = Sheets(Sht0).Cells(j1, 11) Sheets(Shtf).Cells(uf, 17) = Sheets(Sht0).Cells(j1, 12) Sheets(Shtf).Cells(uf, 18) = Sheets(Sht0).Cells(j1, 13) Sheets(Shtf).Cells(uf, 19) = Sheets(Sht0).Cells(j1, 14) Sheets(Shtf).Cells(uf, 20) = Sheets(Sht0).Cells(j1, 15) uf = uf + 1 ux = ux + 1 Next j1 Sheets(Sht0).Range("Clear").ClearContents Application.ScreenUpdating = True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Selecting from Worksheet to fill combo boxes on User Form | Excel Programming | |||
How do I create a Reset Button on a form created in Excel | Excel Programming | |||
How can I reset an Excel form that has radio buttons. | Excel Programming | |||
Excel, how to reset the "last used cell on the worksheet " | Excel Discussion (Misc queries) | |||
Reset Combo Box back to Null | Excel Programming |