I have used VBA code to hide some rows. These rows are hidden when I click a check box.
The problem I have now is - the check boxes associated with each row will not hide. This also interferes with my original VBA code to hide the rows and stops working. I would like to hide these check boxes with the rows.
Please can you advise?
You need to set the checkboxes to "Move and Size With Cells." The last time I did this, with Excel 2003 it was easy: just right-click, choose "Properties" and choose that option. Now if you try that you'll see the option, but it's disabled:
So instead you need to access the more modern-looking format menu in Excel 2007 onwards. I did it by clicking the little "more" arrow on the Drawing Tools tab's Format group. For some reason it's enabled there. Once you set it your checkbox will hide with its row:
Related
I would love to activate insertion in one Column in my Excel sheet but diable it in the rest columns . I use Protect sheet but it protects all my sheet.
How Can I make only one column enabled and the rest disabled ?
Thank you in advance !
Select the whole sheet using the very top-left square in the sheet
On the Home tab, in the Alignment group, click the small arrow to open the Format Cells popup window.
On the Protection tab, select the Locked check box, and then click OK to close the popup.
Select the column you wish to be enabled
repeat step 2
On the Protection tab, unselect the Locked check box, and then click OK to close the popup.
On the Review tab in the ribbon, in the Changes group, select Protect Sheet
Partial source https://support.microsoft.com/en-us/office/lock-cells-to-protect-them-cb7835f6-9c37-4161-bb53-d1c410acaf21
In Excel (via VBA) I preselect a range and set certain predefined sorting options. Instead of executing the sorting via VBA I want to display the dialog box as it would be when clicking on the sorting button in the ribbon.
This way the user would have the option to check the sorting settings and change them if necessary.
Here's a screen shot of what I mean. I marked the button and the dialog box with a red circle. Ignore the enabled filter, it should work if the filter is disabled as well:
Application.CommandBars.ExecuteMso "SortCustomExcel"
I've deleted a pivot table in code by first selecting it, and then pressing delete. The area that the pivot table occupied is now not displaying gridlines. All other cells in this sheet are displaying gridlines. I have googled this problem, and several suggestions have been mooted in response to similar questions. These include:
Navigate to Page Layout tab, and click on View Gridlines.
Navigate to File / Options / Advanced, and ensure Gridline Colour is set to Automatic.
Select the affected cells, and click Ctrl+1 to format the cells. Go to the Border tab and ensure that none of the borders are active.
Select the affected cells, navigate to Home tab on the ribbon, and set the Colour Fill option to No Fill.
Ensure that there is no conditional formatting on the spreadsheet.
None of the above work. However, if I copy and paste a cell from an unaffected area of the spreadsheet to the affected area, the gridlines then become visible. This is not an ideal solution though.
Can anyone help?
I can't seem to attach a version of the spreadsheet to this post.
A cell does (simplified) contain a content and a format. By using ENTF key you clear content. If you want to delete both there is two ways:
By VBA:
You need to clear Formats on the range as follows:
Range("your Range").ClearFormats
The format remains because you have used clearContents by just deleting
Use Range("Your Range").Clear to delete both content and format
Without VBA:
See the picture below and select ClearALL in the Menu
Select the area where your PivotTable used to be, and then go to "Home" > "Editing" > "Clear" ([Alt],[H],[E],[A])
You have deleted the contents of cells, but not the cells themselves, not the special PivotTable formatting.
I have a workbook that has many checkboxes (form control) on one tab. I check the box (Yes/No/NA) based on values in other tabs,. The tab with the checkboxes, is a form that was created, that needs to be printed, but the users cannot click any of the boxes because these decisions are driven by formulas.
I have locked the workbook & unchecked all the boxes in the popup.
So the question is, how do I prevent all the check boxes from being clicked/checked??
AHIA,
LarryR...
For a Form Control:
Right-click and select Format Control...
Select the Protection tab.
Make sure that Locked is checked
Select the Control tab.
Choose a cell in the Cell Link field.
Press OK.
Right-click on the cell that you referenced in step 5.
Select Format Cells...
Select the Protection tab.
Make sure that Locked is checked.
Select Hidden if you don't want users to see it.
Press OK.
Right-Click on the Worksheet Tab
Select Protect Sheet
Make sure that Protect worksheet and contents of locked cells is checked.
That should do it!
Protect the cells with the check-boxes, and when you click on protect Sheet uncheck the Select locked cells from the list of what the users are allowed to do after the document is locked; that way they'll be able to see but not click on those cells.
Got the same issue and ive solved the issue by right click on the sheets and there is a grouping selection, ungroup it and the checkbox works again.
I am looking for a way to add a logo or other picture in an Excel sheet and lock its position on the sheet, so that the user won't get annoyed if he happen to grab it while using.
I tried locking cells, sheet, but nothing seems to work.
I am using Excel 2007.
Not really a programming question but the way to do this is...
Right click the image and choose Size and Properties.
Click Properties tab and under properties,(optional- choose Don't move or size with cells) and ensure the Locked box is checked.
Highlight the cells of the worksheet you want the users to be able to edit, right click inside one of them and choose Format Cells. In the protection tab uncheck the locked checkbox.
Then you can protect the worksheet. Click Home, then Format, then Protect Sheet.
Make sure you unselect Select locked cells, leave the top checkbox selected (Protect worksheet and contents of locked cells) as well as select unlocked cells checked.