LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default UserForm CheckBox Help

I have a problem with a CheckBox on a UserForm that I can't figure out how to
fix or work around, and I was hoping somebody could help me with it. I have a
UserForm with several different controls that I use to make decisions on what
variables to accept and what not to (including ListBoxes, TextBoxes,
ComboBoxes, etc). I have 4 CheckBoxes that by clicking them changes the
values in the worksheet. Two of these are no problem, and they work fine
since all they do is put a "P" in a cell or take it away. The other two are
the issue in that they cause a value from one cell to be moved to another. I
can't just make it "=" because it makes a circular reference. Here's the
coding I have for one month and one CheckBox.

If TextBox5 = "10/31/2008" Then
If Me.CheckBox4.Value = True Then
If Me.ListBox14 < 0 Then
ActiveSheet.Range("O67").Select
Selection.Copy
Range("T55").Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats,
Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
ElseIf Me.ListBox14 = 0 Then
Range("T55").Select
End If
ElseIf Me.CheckBox4.Value = False Then
Range("T55").Select
End If

I used a Paste Special to avoid the circular reference. Cell O67 is where the
data is that, if I click CheckBox4, is copied into cell T55 (this formula
will go through 72 versions in all, but if this can be made to work I can
adjust the others).

Here's the problem. When I click the CheckBox it does what it's supposed to,
copying and pasting the value from cell O67 into T55. If I go on to the next
sheet then go back however the amount in T55 is erased, although the CheckBox
on the UserForm is still checked. I have this coding to make it look to see
if it was checked (probably a better way to do that but I don't know it):


If ActiveSheet.Range("T55") < 0 Then
Me.CheckBox4.Value = True

I hope this is enough info. Any help at all would be appreciated.

--
Message posted via http://www.officekb.com

 
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
link a checkbox in a sheet to a checkbox on a userform? Arjan Excel Programming 0 November 10th 06 01:37 PM
Userform Checkbox Bill[_30_] Excel Programming 1 June 20th 06 10:07 PM
CheckBox in userform MD Excel Programming 2 December 2nd 04 06:42 PM
CheckBox on UserForm Michel[_4_] Excel Programming 0 August 3rd 04 12:38 AM
Userform and checkbox.... Ben.c Excel Programming 3 December 19th 03 05:56 PM


All times are GMT +1. The time now is 08:04 AM.

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"