Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default Sorting Check Boxes

I have a worksheet with data that I build and sort with macros to present the
data in different desirable fashion. Each line of the data has a check box
to allow a flag to be set by the user. Although the check box moves with the
data, the linked cell stays constant. As such, I need to delete all of the
check boxes, sort the data, and then recreate the check boxes. This works
but is a little time consuming. Is there a way to have the linked cell move
with the check box? For what it is worth, the cell is directly under the
check box.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Sorting Check Boxes

How about an alternative?

Just use a cell in the same row, but format it to show a checkmark when there's
something in it?

I find this technique pretty easy...

Select the range
Format|cells|number tab|custom category
In the "type:" box, put this:
alt-0252;alt-0252;alt-0252;alt-0252

But hit and hold the alt key while you're typing the 0252 from the numeric
keypad.

It should look something like this when you're done.
ü;ü;ü;ü
(umlaut over the lower case u separated by semicolons)

And format that range of cells as Wingdings.

Now, no matter what you type (spacebar, x, anyoldtextatall), you'll see a check
mark.

Hit the delete key on the keyboard to clear the cell.

If you have to use that "checkmark" in later formulas:

=if(a1="","no checkmark","Yes checkmark")

And since this is just data, it'll sort with the other cells.

ZipCurs wrote:

I have a worksheet with data that I build and sort with macros to present the
data in different desirable fashion. Each line of the data has a check box
to allow a flag to be set by the user. Although the check box moves with the
data, the linked cell stays constant. As such, I need to delete all of the
check boxes, sort the data, and then recreate the check boxes. This works
but is a little time consuming. Is there a way to have the linked cell move
with the check box? For what it is worth, the cell is directly under the
check box.

Thanks


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default Sorting Check Boxes

Dave,

Thanks for your response. Unfortunately, it is not quite what I was looking
for. I actually want the user to be able to use the check box to change a
setting for that line of data.

I ended up using a sledgehammer approach and linked the check boxes to a
part of the worksheet that was not being sorted. Not pretty, but it works.
Please let me know if you have a more elegant solution.

"Dave Peterson" wrote:

How about an alternative?

Just use a cell in the same row, but format it to show a checkmark when there's
something in it?

I find this technique pretty easy...

Select the range
Format|cells|number tab|custom category
In the "type:" box, put this:
alt-0252;alt-0252;alt-0252;alt-0252

But hit and hold the alt key while you're typing the 0252 from the numeric
keypad.

It should look something like this when you're done.
ü;ü;ü;ü
(umlaut over the lower case u separated by semicolons)

And format that range of cells as Wingdings.

Now, no matter what you type (spacebar, x, anyoldtextatall), you'll see a check
mark.

Hit the delete key on the keyboard to clear the cell.

If you have to use that "checkmark" in later formulas:

=if(a1="","no checkmark","Yes checkmark")

And since this is just data, it'll sort with the other cells.

ZipCurs wrote:

I have a worksheet with data that I build and sort with macros to present the
data in different desirable fashion. Each line of the data has a check box
to allow a flag to be set by the user. Although the check box moves with the
data, the linked cell stays constant. As such, I need to delete all of the
check boxes, sort the data, and then recreate the check boxes. This works
but is a little time consuming. Is there a way to have the linked cell move
with the check box? For what it is worth, the cell is directly under the
check box.

Thanks


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Sorting Check Boxes

How about dropping the linked cells altogether.

And if you used checkboxes from the Forms toolbar, you could assign the same
macro to each checkbox that plops true/false into the cell that is below the
checkbox.

Option Explicit
Sub CBX_Click()
Dim CBX As CheckBox
Set CBX = ActiveSheet.CheckBoxes(Application.Caller)
CBX.TopLeftCell.Value = CBool(CBX.Value = xlOn)
'CBX.TopLeftCell.NumberFormat = ";;;"
End Sub



ZipCurs wrote:

Dave,

Thanks for your response. Unfortunately, it is not quite what I was looking
for. I actually want the user to be able to use the check box to change a
setting for that line of data.

I ended up using a sledgehammer approach and linked the check boxes to a
part of the worksheet that was not being sorted. Not pretty, but it works.
Please let me know if you have a more elegant solution.

"Dave Peterson" wrote:

How about an alternative?

Just use a cell in the same row, but format it to show a checkmark when there's
something in it?

I find this technique pretty easy...

Select the range
Format|cells|number tab|custom category
In the "type:" box, put this:
alt-0252;alt-0252;alt-0252;alt-0252

But hit and hold the alt key while you're typing the 0252 from the numeric
keypad.

It should look something like this when you're done.
ü;ü;ü;ü
(umlaut over the lower case u separated by semicolons)

And format that range of cells as Wingdings.

Now, no matter what you type (spacebar, x, anyoldtextatall), you'll see a check
mark.

Hit the delete key on the keyboard to clear the cell.

If you have to use that "checkmark" in later formulas:

=if(a1="","no checkmark","Yes checkmark")

And since this is just data, it'll sort with the other cells.

ZipCurs wrote:

I have a worksheet with data that I build and sort with macros to present the
data in different desirable fashion. Each line of the data has a check box
to allow a flag to be set by the user. Although the check box moves with the
data, the linked cell stays constant. As such, I need to delete all of the
check boxes, sort the data, and then recreate the check boxes. This works
but is a little time consuming. Is there a way to have the linked cell move
with the check box? For what it is worth, the cell is directly under the
check box.

Thanks


--

Dave Peterson


--

Dave Peterson
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
Copy and move check box (check boxes) with new cell link? Marty Excel Worksheet Functions 1 January 20th 10 07:43 PM
How do I increase the size of check in check boxes Adams, Les Excel Discussion (Misc queries) 0 September 19th 06 02:35 PM
Enable check box in protected sheet + group check boxes Dexxterr Excel Discussion (Misc queries) 4 August 2nd 06 12:00 PM
How do i create a value for check boxes or option boxes Tim wr Excel Discussion (Misc queries) 1 February 9th 06 10:29 PM
Check Box influencing other Check Boxes Dave Ramage[_2_] Excel Programming 0 September 4th 03 02:14 PM


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