ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Another UserForm query (https://www.excelbanter.com/excel-programming/356143-another-userform-query.html)

Phil1982

Another UserForm query
 
Thank you Tom Ogilvy for answering my question about Checkboxes...you've made
it a lot easier than I was first thinking!

Could you please help me out with another question:
When I click the command button to make it enter the selected values into
the cells, what can I do to make Excel clear the form so that it is ready for
the next record?

At the moment, when I have finished with one record and want to tick the
relevant boxes for the next record, boxes start off with previous values
instead of blank.

This is how the code is at the moment@

Private Sub CMDnext_Click()
ActiveCell.Offset(0, 1).Value = CBXhwork1.Value
ActiveCell.Offset(0, 2).Value = CBXhwork2.Value
ActiveCell.Offset(0, 3).Value = CBXhwork3.Value
ActiveCell.Offset(1, 0).Range("A1").Select 'moves cursor to
next pupils record
End Sub


I have called the form HWForm

Again I've had a few guesses and looked in the object browser for solutions
to this problem.
I'd have thought the logical thing was to put HWForm.Clear at the end of the
CMDnext_Click() procedure.

But that doesn't work/isn't an option


Thanks

Phil

Crowbar via OfficeKB.com

Another UserForm query
 
To reset a checkbox put this in your code

CheckBox1.Value = False

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200603/1


All times are GMT +1. The time now is 07:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com