Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends
I am trying to hide first expression column in my pivot chart using the following macro code. But how to call this macro to hide the first expression column in pivot char. Is it N or N-1 or something else.
Public Sub hide
Call HideColumn("CH67",2)
Call HideColumn("CH69",2)
End Sub
Private Sub HideColumn(ch,n)
Set ch = activeDocument.getsheetobject(ch)
ch.setpixwidth(n),0
End Sub
Thanks
The first column has index number 0, the second 1 etc.
Hi Gysbert,
So the index 0 points first dimension. My requirement is to always hide the first expression. For this I am trying to write a macro like this. But When the user changes the number selections in Pivot table the width is interchanging to other columns. Please tell me how to tweak this macro so that it always identifies the first expression.
Public Sub hide
Call HideColumn("CH67",2)
Call HideColumn("CH69",2)
End Sub
Private Sub HideColumn(ch,n)
Set ch = activeDocument.getsheetobject(ch)
ch.setpixwidth(n),0
End Sub
Thanks
How do you undo this macro? How do you unhide the column you just hid? What would be the macro to "undo" it? I'd like to toggle back and forth.