Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default How to reset excel worksheet form lilstbox and combo box

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default How to reset excel worksheet form lilstbox and combo box

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default How to reset excel worksheet form lilstbox and combo box

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting from Worksheet to fill combo boxes on User Form Brian Excel Programming 1 February 18th 10 05:31 AM
How do I create a Reset Button on a form created in Excel SadiesMom Excel Programming 1 November 24th 08 09:01 PM
How can I reset an Excel form that has radio buttons. JaxPM Excel Programming 5 May 4th 06 03:51 AM
Excel, how to reset the "last used cell on the worksheet " mcwhirter Excel Discussion (Misc queries) 2 December 15th 04 12:22 AM
Reset Combo Box back to Null Aaron[_9_] Excel Programming 1 November 22nd 03 04:39 AM


All times are GMT +1. The time now is 05:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"