Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 181
Default XL2002 - Resetting Checkbox values on Multipage Form

I have a userform that contains a multipage control. Page1 of the multipage
control contains 5 checkboxes (numbered 2 to 6).

I'm trying to reset the checkbox values to false before the form is
activated but can't do it using a loop. Can you shed some light on the
issue? (code below)

Also, once the form is active I'd like to update a textbox everytime one of
the checkboxes is clicked. I've currently set up a click event for each
checkbox but seems a bit cumbersome. Is there a better way to do it, perhaps
with a groupname or frame control?

Thanks - Trevor

--------------------------------------------------------------------------------

With UserForm1
.CheckBox1 = True
.TextBox1.Value = Sheets("Customer").Range("C5").Value
.TextBox2.Value = Format(Sheets("Customer").Range("F43"), "£0,00")
For i = 2 To 6
.MultiPage1.Pages(1).CheckBox(i) = False
Next i
.MultiPage1.Pages(1).TextBox13.Value =
Format(Sheets("Customer").Range("L24").Value, "£0,00")
.Show
End With
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default XL2002 - Resetting Checkbox values on Multipage Form

Change: .MultiPage1.Pages(1).CheckBox(i) = False
To: .Controls("CheckBox" & i) = False

Regarding the 2nd question, maybe you can send each Checkbox_Click
event to one common Sub. But it's impossible to say w/o knowing what
each one does.

Hth,
Merjet


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 181
Default XL2002 - Resetting Checkbox values on Multipage Form

Hi Merjet - Thanks for your help.

All the checkboxes do, once they are clicked, is update a value on a sheet
and then add that value to a textbox on the form.

Me.MultiPage1.Pages(1).TextBox13.Value =
Format(Sheets("Customer").Range("L24").Value, "£0,00")

Although this only begins to work once a check box is clicked twice (not a
doubleclick). My textbox is set to £0,00 when the form activates. Setting a
checkbox to TRUE should then change the textbox to a new value e.g £500. But
it only updates the textbox once the checkbox is set to FALSE - which is
obviously wrong.

Any suggestions?

Trevor



"merjet" wrote:

Change: .MultiPage1.Pages(1).CheckBox(i) = False
To: .Controls("CheckBox" & i) = False

Regarding the 2nd question, maybe you can send each Checkbox_Click
event to one common Sub. But it's impossible to say w/o knowing what
each one does.

Hth,
Merjet



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
Saving values in a multipage form ASU Excel Programming 0 January 31st 06 07:42 PM
checkbox on form reset from checkbox on sheet raw[_12_] Excel Programming 1 December 3rd 05 05:08 AM
Color in Multipage Form Gian Excel Programming 2 August 24th 05 03:56 PM
multipage form Sandy Excel Programming 1 May 6th 05 07:47 AM
Duplicate Values on Multipage form Robbyn Excel Programming 3 March 27th 05 06:14 PM


All times are GMT +1. The time now is 09:15 PM.

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

About Us

"It's about Microsoft Excel"