Trapping Outline Expand / Collapse

May 15, 2009

I suspect I need a class module for this...

How do I trap the event when a user chooses to expand / collapse outlines (columns in this instance) on a worksheet?

Basicallly, when attempting to expand I want to prompt the user to enter a password and then unprotect the sheet. And if collapsing to prompt again and then protect the sheet. I have this bit covered, just not sure how to trap the event.

View 9 Replies


ADVERTISEMENT

VBA Code - Expand / Collapse Grouped Columns

Feb 10, 2014

Currently, Columns EFG are grouped.

I have a userform with checkboxes. With the click of check box, i would like for it to do the following.

If checked, it will expand the group. If unchecked, it needs to stay collapsed.

Here is an example of code i currently have and is not working.

[Code] ......

View 2 Replies View Related

Code To Conditionally Expand Or Collapse Only Certain Grouped Rows

May 13, 2011

I have several groupings of rows in worksheet. I need to have each separate grouping be able to automatically expand or collapse based on a value in each group.

ie-
Grouping Rows 11-15
Grouping Rows 21-25
Grouping Rows 31-36

If cell values in A10, A20, or A30 = 1, then the grouping below it would need to be collapsed, and if not, then expanded.

View 3 Replies View Related

Expand/Collapse Columns On Password Protected Worksheets

Apr 30, 2003

Is there a way to password protect a document AND still allow for a user to expand or collapse columns?

Currently, it appear that when a worksheet is password protected, one cannot expand or collapse a column.

View 9 Replies View Related

Outline And Rollup Subtotals Based On Outline Numbering In Column A

Jul 10, 2012

I have a spreadsheet that contains an outline-like number in column A, except where there are values in Column C. What I want is to automatically outline based on column A and subtotal at each succesive outline level (i.e. I would like to be able to roll up the subtotals to variousl depths of the outline).

Code:
A B C
1.1first level
1.1.1Second level
1.1.1.1third level
value 5
1.2first level
1.2.1second level
value 7
value 4
1.2.2second level
1.2.2.1third level
value 6

View 2 Replies View Related

Keystroke Trapping

Jan 18, 2007

Since I practically never deliberately hit Control-2 through Control-5 -- and do hit them "more than never," I thought I'd grab them with the KeyPress event (or KeyDown?). Then it hit me that I'm not sure where it would go.

This is for every workbook so this would generically reside in personal.xls. ThisWorkbook doesn't seem like the right place; I want its scope to be ActiveWorkbook. Would it require a class module (actually, I already looked, and don't see any keyboard events under "App")?

View 9 Replies View Related

Only Simply Vba Key Trapping

Mar 23, 2007

I only want to do a "macro" in VBA that must do two things
record the keys pressed (during only 5 minutes)
and save the results in a text file

It is the only code in VBA I try to write

I found public documentation (legal stuff I mean)
about GetKeyState

I have snippets of code for save data as txt file

But I don't succeed in finishing the all code.

My purpose is to show to my daughter in law that if she doesn't respect rules
on the net, I'm able (but I don't want to really do it, it's just a threat) to know what she's doing.

If I want a real keylooger, I've downloaded one on the net.
I haven't done that and I don't want to.

I don't think a vba code with
the function getkeystate and Open file (an only that)
is a danger.

View 3 Replies View Related

Collapse All Levels In Pivot Table

Sep 9, 2010

I created a PivotTable that works fine. A user can click on an option and the subcategories expand; then he can choose one of those and a new group opens, etc., going 4 or 5 levels deep in options.

What I need to do is: If he then wants to start over and choose another option in the initial level, I want all of the subcategories to reset to their original closed state (unexpanded). As it is now, when he goes back to the original choice, that is closed, but everything inside it is still open as he had selected them previously.

View 6 Replies View Related

Trapping A Msgbox During Validation

Oct 23, 2008

The below code validates values in a combined range. Values can be a 0 or a 3-digit combo of values 0 through 4. The problem is that whenever the Delete key is pressed to delete an acceptable value, the msgbox appears. How can the msgbox appear ONLY if a user tries to enter a wrong value--the cells can be, and are, left null regularly, so the msgbox is annoying.

View 3 Replies View Related

Trapping Userform Events

Jan 9, 2009

I'm trying to trap the events of a user form in a class of mine. At the top of my class I have the standard:

View 2 Replies View Related

Trapping File Version In VBA?

Dec 11, 2012

how I could amend the following code so that my target worksheet includes file versions? The worksheet range "Folder" contains a string specifying the target folder and the worksheet range "IncludeSubFolders" is either TRUE or FALSE. I can trap FilePath, FileName, FileSize and DateModified fine but not File Version (I'm working with DLL libraries).

Code:

Dim iRow As Long
Sub ListFiles()
iRow = Range("DatabaseStart").Offset(1, 0).Row
Call ListMyFiles(Range("Folder"), Range("IncludeSubFolders"))
End Sub

[Code]......

View 1 Replies View Related

Error '9' Trapping Worksheet

May 1, 2007

IS there any code where I can use to error trap worksheet so that if any error occurs like runtime error 9 then it can be traped.

View 2 Replies View Related

Double Click To Collapse A Set Number Of Rows

Mar 18, 2014

I am trying to build a worksheet which has an account number in column B with several more rows of content starting in column C and beyond. I would like to be able to hide the 9 rows under the row with the account number by double clicking on the account number. I found this code which will work by collapsing to the next account number, but it collapses the account number underneath it too. Is there a way to collapse only the blank cells in the column until the next number or to program the code to only collapse/hide the next 9 rows below the double clicked cell?

View 2 Replies View Related

Error Trapping When Reading From Another Workbook?

Jun 3, 2014

I'm using VBA to open several files and pull information from them into a workbook with the hopes of eventually outputting the information to a formatted text file that can be uploaded to a data transfer system that will fill out a form for me. The problem I am finding is that the workbook that I need to access has faulty VBA code that executes everytime the workbook is opened. I realize the easiest solution would be to fix the code that is faulty however the workbook that I am accessing is automatically generated for each product with the faulty code embedded requiring me to handle the error on the back end. Attached is my code and I attempted using error trapping to handle this issue but I've concluded that I either lack understanding of error trapping or the fact that the error is in a cascaded workbook complicates the error trapping code.

View 5 Replies View Related

Easy Way To Collapse Rows And Columns On All Sheets In Workbook

Jan 28, 2014

Is there an easy way to collapse rows and columns on all sheets in a workbook.

View 3 Replies View Related

Macro To Collapse Subtotals Results In: Cannot Shift Objects Off Sheet

Aug 6, 2008

I'm getting a runtime 1004 error "Cannot Shift Objects Off Sheet" right at the line when i am trying to collapse a subtotal (showlevels, rowlevel 2). I searched about this and i tested. I cannot find any comments, hidden comments, rows or columns. I cannot find any shapes (ran "Kill_Shapes" posted by Aaron Blood).

Sheets("Oxnard Planning 10 (all)").Activate
'SORT: Del Code (D), then Style (A)
Range("A1").Sort Key1:=Range("D1"), Order1:=xlAscending, _
Key2:=Range("A1"), Order2:=xlAscending, Header:=xlYes, OrderCustom:=1, _
MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal, DataOption2:=xlSortNormal
'Subtotal by STYLE
Range("A1").subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(5, 6, 7, 8, 9, 10, 11), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
'Subtotal lines = Bold & Pink
ActiveSheet.Outline.ShowLevels RowLevels:=2 '<< ERROR:Cannot shift Objects off Sheet
With Range(Range("K65536").End(xlUp), "A1").SpecialCells(xlCellTypeVisible)
.Interior.ColorIndex = 38
.Font.Bold = True
End With
ActiveSheet.Outline.ShowLevels RowLevels:=3

View 2 Replies View Related

Excel 2007 :: How To Retrieve Error Trapping Options In VBA

Aug 13, 2014

How can we "read" information from the VBE Error Trapping options (Break on All Errors/ Break in Class Module/ Break in Unhandled Errors) programmatically?

Background: I am developping a spreadsheet that needs to be sent around to distant users. Some of them might not have the default "Break on Unhandled Errors" setting), which would just make my programme fail or risk to fail...

This issue has been covered in the thread below, but the proposed solution doesn't work on my side (always returning the same output!): [URL] .....

Hint: it has been suggested to look into the registry, which the linked post does.

Ideally, I would love to be able to change the setting programatically, but that seem near to impossible in excel 2007 VBA (unless calling an external programme that closes and restarts excel after having changed the option?...)

View 10 Replies View Related

Outline/wbs Sort

Jun 25, 2007

have an Excel VBA function to sort an Outline/WBS?

I have tried the conventional Excel text and numeric sort but they do not work on an Outline/WBS.

I have a column in an excel workbook with a Outline/WBS.
If a user uses the default Excel sort I need to sort the Outline/WBS back to the correct Outline structure (example below):

1
1.1
1.2
1.3
1.3.1
1.3.2
2
2.1
2.2
2.2.1
2.2.2
2.3

View 9 Replies View Related

Selected Cell Outline

Oct 9, 2008

The outline that indicates my selected cell is a very pale blue which I can hardly see. how to change it to black or some color I can see?

View 3 Replies View Related

Outline.ShowLevels Event And Value

Jun 12, 2006

1. Is there an event when Outline.ShowLevels are changed? I want to hide some columns when the outline level changes depending on the level. For example if Outline.ShowLevels is 2 I want to hide certain columns and if Outline.ShowLevels is 3 I want to unhide those columns. I realise you can have a mix of levels showing but I will hideunhide the columns based on what has changed ie from level 2 to level 3 or vice versa.

View 6 Replies View Related

Group And Outline Columns

May 25, 2007

i have seen this cool feature in a workbook, but I am unable to find out how implement it myself. I can't really explain it (thus I am unable to find good search results) so I have added a little picture of what I mean. Its about adding controls for hiding and unhiding columns. How do I get such nice plusses and minusses into my workbook? I use Excel 2002

View 4 Replies View Related

Excel 2003 :: Group And Outline

May 14, 2013

In Excel 2003 I have Manually Grouped a number of rows. (Data>Group and Outline>Group).

If I use the buttons with the numbers 1, 2, 3 (indicating an outlining level) to collapse or expand the outline I receive the Error Message: "Cannot shift objects off sheet."

If I use the collapse button (-) or expand (+) button the data collapses and expands as I would expect.

I am aware of the normal issues surrounding objects and outlining and have ensured that I have changed the properties of all my of the objects in the sheet to "Move and size with cells". There are no comments in the grouped rows.

View 4 Replies View Related

Turn Off Group Box Outline And Label?

Sep 15, 2013

I know how to insert various groups of radio buttons on one sheet. They must be in their own group box control. The problem I have is that I don't see any option to turn off the resulting group box outline and label so it cannot be seen. Is there some way to do that in Excel 2010? I have 16 groups of two radio buttons across the top of the sheet and space is at a premium. If there was no outline it would look much nicer. The cells below the radio buttons function as the labels the way I am using them.

View 5 Replies View Related

Enable Outline But Protect Sheet

Sep 15, 2007

I have a sheet that is several hundred rows long and so I have grouped like data so the user can expand or colapse the data they would like to see. There is nothing on the page the user will need to modify so I have protected the page so they cannot make changes. If I protect the sheet then I am no longer able to expand or colapse the groupings.

View 6 Replies View Related

Group/Outline Worksheets When Protected

Aug 20, 2008

I Need the outline/group feature to work on a protected workbook with over 200 sheets, meaning a macro to cover the entire workbook not just a single sheet. This macro should travel with the workbook as it will be on many different peoples PC's

Private Sub Workbook_Open()
Dim cSheet As Integer
Dim tSheet As Worksheet
On Error Resume Next
cSheet = 1
Set tSheet = Worksheets(cSheet)
While Err.Number = 0
Call wbProtect(tSheet)
cSheet = cSheet + 1
Set tSheet = Worksheets(cSheet)
Wend
Err.Number = 0
End Sub..........................

View 2 Replies View Related

Group & Outline On Protected Worksheet

Jul 25, 2006

I curently using the group and outline to subtotal certain data. I do not want to data to be modified. As a result I protect the particular sheet. Problem is once I protect the worksheet, I can't expand the data hidden (using the group & outline). Is there anyway that i can expand the data & in the same time protect the
data. A sample in enclose(without worksheet protected)

View 6 Replies View Related

Show Different Outline Levels Of 2 Groups

Mar 19, 2008

I have two groups (outlines) of columns on the same sheet. the following line :

ActiveSheet.Outline.ShowLevels 0, 1

controls the two groups. What if I want different levels od detail for each group ?
TIA.
Daniel

View 2 Replies View Related

Automatic & Dynamic Row Numbering For Outline Numbers Like #.#.#

Mar 11, 2008

I would like to ask for some assistance to my Spreadsheet problem.

To illustrate my problem please see below:

1------------> Level 1
1.1----------> Level 1 Sublevel 1
1.1.1--------> Level 1 Sublevel 1 Item 1
1.1.2--------> Level 1 Sublevel 1 Item 2
1.2----------> Level 1 Sublevel 2
1.2.1--------> Level 1 Sublevel 2 Item 1
1.2.2
2
2.1
2.1.1
2.1.1
2.2
and so on

I need to have a formula to automate the adding of outline numbers from "Level 1, Sublevel 1, Item 1..." So that if I deleted or added a row, the rest will automatically update themselves.

I will be the one manually inputing the Top Level and Sublevels I just need that the Items will be automatically added and computed basing from the previous level.

What I am planning to do is:
1. Check previous cell if the format has two decimal points or periods --> kinda stuck here

2. If there's only one then it will be the Sublevel 1 Item 1 (or depending to its location)

3. If there's already two periods "." then it will compute automatically for what item it is already.
ie:

1
1.1
1.1.1
1.1.2----->Checks the previous cell if it has 2 decimal places then if it does then it will add 1

View 9 Replies View Related

Capture Group/Outline Row Hide/Show

Apr 26, 2008

The following is how the data is displayed:

[JAN] [a] [FEB] [b] [MAR] [c] [Q1] [APR] [d] [MAY] [e] [JUN] [f] [Q2] etc.

Basically, it is months and quarter. However I have an additional column that is hidden after each month - [a], [b], [c] etc. Those are displayed whenever a cell in the previous column is clicked. Now, I select all the columns from [JAN] to [c] and group them and I have a + on the top most row.

Problem is when I click on +, it expands the month as well as [a] [b] [c]. I have a macro to hide these, but how do I trap the [+] [-] action and run the hiding macro after that?

View 5 Replies View Related

Outline Macro Not Allowing Filtering On A Protected Sheet?

May 5, 2014

I have the following macro so that we can use the outline feature without having to unprotect a sheet.

Private Sub Workbook_Open()
With Worksheets("Schedule")
.Protect Password:="APQP", Userinterfaceonly:=True[code]....

However once the macro is run, filtering will not work without unprotecting the sheet first. If you choose not to run the macro, filtering will work without unprotecting the sheet however the outline feature will not. what I need to add and where to make both the outline and filter features to work without having to unptotect the sheet?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved