From: Tonso on 30 Mar 2010 18:26 Using xl2003, I have the following Worksheet Selection Change code: If Target.Column = 5 Then Target.Columns.ColumnWidth = 27.11 ActiveWindow.Zoom = 85 Else Columns(5).ColumnWidth = 3.78 'ActiveWindow.Zoom = 75 End If I would like to be able to change the values zoom 85 and 75 to correspond to the values in 2 cells, for eample, Notes!B5 and Notes! B6, so the zoom factors can be set as needed. How can this be done? As always, Thanks, Tonso
From: ozgrid.com on 30 Mar 2010 18:43 If Target.Cells.Count > 1 Then Exit Sub If Target(1,1).Address = $B$5 Then ActiveWindow.Zoom = 85 If Target(1,1).Address = $B$6 Then ActiveWindow.Zoom = 75 "Tonso" <wthomasss(a)hotmail.com> wrote in message news:16af7cc0-e097-498c-b627-67d77af7f5ab(a)g10g2000yqh.googlegroups.com... > Using xl2003, I have the following Worksheet Selection Change code: > > If Target.Column = 5 Then > Target.Columns.ColumnWidth = 27.11 > ActiveWindow.Zoom = 85 > Else > Columns(5).ColumnWidth = 3.78 > 'ActiveWindow.Zoom = 75 > End If > > I would like to be able to change the values zoom 85 and 75 to > correspond to the values in 2 cells, for eample, Notes!B5 and Notes! > B6, so the zoom factors can be set as needed. How can this be done? > > As always, > > Thanks, > > Tonso
From: Gord Dibben on 30 Mar 2010 18:47 Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Column = 5 Then Target.Columns.ColumnWidth = 27.11 ActiveWindow.Zoom = Sheets("Notes").Range("B5") '85 Else Columns(5).ColumnWidth = 3.78 ActiveWindow.Zoom = Sheets("Notes").Range("B6") '75 End If End Sub Gord Dibben MS Excel MVP On Tue, 30 Mar 2010 15:26:44 -0700 (PDT), Tonso <wthomasss(a)hotmail.com> wrote: >Using xl2003, I have the following Worksheet Selection Change code: > >If Target.Column = 5 Then > Target.Columns.ColumnWidth = 27.11 > ActiveWindow.Zoom = 85 > Else > Columns(5).ColumnWidth = 3.78 > 'ActiveWindow.Zoom = 75 > End If > >I would like to be able to change the values zoom 85 and 75 to >correspond to the values in 2 cells, for eample, Notes!B5 and Notes! >B6, so the zoom factors can be set as needed. How can this be done? > >As always, > >Thanks, > >Tonso
From: Tonso on 30 Mar 2010 22:31 On Mar 30, 6:47 pm, Gord Dibben <gorddibbATshawDOTca> wrote: > Private Sub Worksheet_SelectionChange(ByVal Target As Range) > If Target.Column = 5 Then > Target.Columns.ColumnWidth = 27.11 > ActiveWindow.Zoom = Sheets("Notes").Range("B5") '85 > Else > Columns(5).ColumnWidth = 3.78 > ActiveWindow.Zoom = Sheets("Notes").Range("B6") '75 > End If > End Sub > > Gord Dibben MS Excel MVP > > On Tue, 30 Mar 2010 15:26:44 -0700 (PDT), Tonso <wthoma...(a)hotmail.com> > wrote: > > > > >Using xl2003, I have the following Worksheet Selection Change code: > > >If Target.Column = 5 Then > > Target.Columns.ColumnWidth = 27.11 > > ActiveWindow.Zoom = 85 > > Else > > Columns(5).ColumnWidth = 3.78 > > 'ActiveWindow.Zoom = 75 > > End If > > >I would like to be able to change the values zoom 85 and 75 to > >correspond to the values in 2 cells, for eample, Notes!B5 and Notes! > >B6, so the zoom factors can be set as needed. How can this be done? > > >As always, > > >Thanks, > > >Tonso- Hide quoted text - > > - Show quoted text - As always, Thanks so much Gord Tonso
|
Pages: 1 Prev: How can I remove a link that won't go away Next: Printing a worksheet in two (or more) columns |