Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Another UserForm query

This is a repeat of an earlier post that has now dissappeared down the list
and there's been no replies yet:

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

Could anyone 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 in advance

Phil
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Another UserForm query

You have to clear each one individually

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
for i = 1 to 3
HWForm.controls("CBXhwork" & i).Value = False
Next i
ActiveCell.Offset(1, 0).Range("A1").Select 'moves cursor to
next pupils record
End Sub

--
Regards,
Tom Ogilvy


"Phil1982" wrote:

This is a repeat of an earlier post that has now dissappeared down the list
and there's been no replies yet:

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

Could anyone 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 in advance

Phil

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
Another UserForm query Phil1982 Excel Programming 1 March 16th 06 10:21 PM
reloading a userform query anthony slater Excel Programming 1 October 7th 04 04:30 PM
Userform text box query?? dude Excel Programming 0 September 22nd 04 07:43 PM
Userform text box query?? Tom Ogilvy Excel Programming 0 September 22nd 04 03:05 PM
Userform text box query?? MDL2004 Excel Programming 0 September 22nd 04 02:41 PM


All times are GMT +1. The time now is 10:46 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"