UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Format A Checkbox To The Center Of The Cell, Office 2013    
 
   
LeeAnn
post Dec 7 2017, 12:56 PM
Post#1



Posts: 1,244
Joined: 2-February 00
From: Mississippi USA Central Time Zone


I have some checkboxes on a spreadsheet I would like to have centered in the cell. I would also like to keep them centered if the row grows. Is there a way to do this? I have looked and it is beyond me on how to do it. Any help would be greatly appreciated. I am not a big fan of Excel as it seems to do something simple turns out to be hard.

--------------------
Lee Ann Davidson
Go to the top of the page
 
doctor9
post Dec 7 2017, 01:59 PM
Post#2


UtterAccess Editor
Posts: 17,917
Joined: 29-March 05
From: Wisconsin


LeeAnn,

Whenever I've worked with checkboxes, it's been in a Template environment, where the users wouldn't be able to change the width of the column where the checkbox control appears. If this is close to what you're doing, try this:

1. Select all of the checkboxes in the same column
2. Select the Format tab on the Ribbon
3. Select Align Left (assuming the checkbox labels are on the right, or missing)
4. Drag all of the checkboxes to the center of the column. Use the left/right arrow keys for small final adjustments.

If you want to actually MOVE the checkboxes after the user changes the column width, you'll probably want to use VBA along these lines:

CODE
Private Sub Worksheet_Activate()

    Me.CheckBox1.Left = Columns(5).Left + Columns(5).Width / 2
'   Copy this for each checkbox.  

End Sub

The column number is the column you want to center your checkbox in, of course. You may want to use a different event, or have a command button for the user to click.

Hope this helps,

Dennis

--------------------
(;,;) Li'l Cthulu says: Please talk about what you're trying to do, as well as how you're doing it.
Changing your real table name to "Table1" and your real form name to "Form1" in your posts makes it more difficult to understand what's going on, not easier.
Guidelines for Posting Questions
Go to the top of the page
 
LeeAnn
post Dec 7 2017, 02:07 PM
Post#3



Posts: 1,244
Joined: 2-February 00
From: Mississippi USA Central Time Zone


Thanks Doc, I am so done with Excel. I can get so aggravated at times with it because I don't quite understand the logic. Finding out the controls are floating and not actually inside the cell was another thing I learned. Never have cared for this application and never will. I will just align like you said and if the customer adjust the size I suppose I will just have to deal with it. It looks ugly but got to deal with it.... Thanks again.

--------------------
Lee Ann Davidson
Go to the top of the page
 
doctor9
post Dec 7 2017, 02:42 PM
Post#4


UtterAccess Editor
Posts: 17,917
Joined: 29-March 05
From: Wisconsin


LeeAnn,

> Finding out the controls are floating and not actually inside the cell

Well... If your checkbox is in column E, and you adjust the width of column C, the checkbox SHOULD move over with column E, unless you have selected "Don't move or size with cells" in the Format Control dialog box. So you got that, at least.

But moving the checkbox while adjusting the column width of the same column where the checkbox is anchored? That may not be what everyone wants. The "floating" aspect is handy because you can place a checkbox almost anywhere - on top of a chart, right on the spot where four cells meet, etc..

If you're willing to let the users alter the sheet design (i.e. the width of a column), I think you just have to accept that you're surrendering a lot of control over the worksheet to them at that point.

Sorry,

Dennis

--------------------
(;,;) Li'l Cthulu says: Please talk about what you're trying to do, as well as how you're doing it.
Changing your real table name to "Table1" and your real form name to "Form1" in your posts makes it more difficult to understand what's going on, not easier.
Guidelines for Posting Questions
Go to the top of the page
 
LeeAnn
post Dec 7 2017, 03:32 PM
Post#5



Posts: 1,244
Joined: 2-February 00
From: Mississippi USA Central Time Zone


Thanks. I have it to where I am satisfied (not happy but satisfied) with it. I never have liked using Excel but I need it for what I am doing here. I think the users will be OK with it.

Thanks again, you helped me out with it and I learned a little today which is always a good thing.

--------------------
Lee Ann Davidson
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    12th December 2017 - 04:33 PM