Button - rearrange column positions in spreadsheet?possible
Hi Jason,
You can hide columns programatically if that will suffice.
Private Sub cmdButton1_click()
Call SwitchView(1)
End Sub
Private Sub cmdButton2_click()
Call Switchview(2)
End Sub
Private Sub cmdButton3_click()
Call Switchview(3)
End Sub
Sub SwitchView(iView As Integer)
Dim sCols As String
Application.ScreenUpdating = False
ActiveSheet.Columns("A:Z").EntireColumn.Hidden = True
Select Case iView
Case 1: sCols = "A:D,G:H,Y:Z" '''Data capturer view
Case 2: sCols = "A:A,D:F,K:M" '''DTP operator view
Case 3: sCols = "A:A,N:P" '''Salesman view
End Select
ActiveSheet.Range(sCols).EntireColumn.Hidden = False
Application.ScreenUpdating = True
ActiveWindow.LargeScroll ToRight:=-1
End Sub
Ray at work
wrote in message
...
Is there possibly a elegant way to allow three different users the
capability to 'rearrange' the positioning of columns in a critical
spreadsheet.
For instance, I have a spreadsheet with 15 columns, but each person
wishes
to order these columns differently:
1. Data capturer view - Button
2. DTP operator view - Button
3. Salesman view - Button
Each button would have to rearrange the columns...eg:
Button 1: columns A:D, G,H,ZY
Button 2: columns: A, D,E,F, K,L,M
Button 3. columns: A, N,M,O,P
Could someone help me with this...greatly appreciated.
Thanks
Jason
|