[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Gary Keramidas

12/14/2006 4:36:00 AM

how do i determine if more than 1 worksheets is selected?

--


Gary



6 Answers

Dave Peterson

12/14/2006 4:39:00 AM

0

In the activewindow???

msgbox activewindow.selectedsheets.count



Gary Keramidas wrote:
>
> how do i determine if more than 1 worksheets is selected?
>
> --
>
> Gary

--

Dave Peterson

NickHK

12/14/2006 4:45:00 AM

0

Gary,

MsgBox ThisWorkbook.Windows(1).SelectedSheets.Count

NickHK

"Gary Keramidas" <GKeramidasATmsn.com> wrote in message
news:OcyoalzHHHA.3468@TK2MSFTNGP04.phx.gbl...
> how do i determine if more than 1 worksheets is selected?
>
> --
>
>
> Gary
>
>
>


Gary Keramidas

12/14/2006 4:59:00 AM

0

ok, thanks guys, one other question.

how do i hide a range of columns using column numbers?

something like:
columns(7,10).hidden = true


--


Gary


"Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
news:4580D57C.868C61FE@verizonXSPAM.net...
> In the activewindow???
>
> msgbox activewindow.selectedsheets.count
>
>
>
> Gary Keramidas wrote:
>>
>> how do i determine if more than 1 worksheets is selected?
>>
>> --
>>
>> Gary
>
> --
>
> Dave Peterson


Mark Dev

12/14/2006 3:30:00 PM

0

Gary,

Just select one cell from each of the columns then use the
EntireColumn.Hidden method of the selection.

Range(Cells(1, 7), Cells(1, 10)).Select
Selection.EntireColumn.Hidden = True

You can substitute your own variables for the "7" and "10" above if you want
to hide some other columns instead.

Regards,
Mark


"Gary Keramidas" <GKeramidasATmsn.com> wrote in message
news:u8G3SyzHHHA.4760@TK2MSFTNGP03.phx.gbl...
> ok, thanks guys, one other question.
>
> how do i hide a range of columns using column numbers?
>
> something like:
> columns(7,10).hidden = true
>
>
> --
>
>
> Gary
>
>
> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
> news:4580D57C.868C61FE@verizonXSPAM.net...
>> In the activewindow???
>>
>> msgbox activewindow.selectedsheets.count
>>
>>
>>
>> Gary Keramidas wrote:
>>>
>>> how do i determine if more than 1 worksheets is selected?
>>>
>>> --
>>>
>>> Gary
>>
>> --
>>
>> Dave Peterson
>
>


Dave Peterson

12/14/2006 4:03:00 PM

0

Here are a couple more:


with activesheet
.range(.columns(7),.columns(10)).hidden = true
end with

or

activesheet.columns(7).resize(,10-7+1).hidden = true


Gary Keramidas wrote:
>
> ok, thanks guys, one other question.
>
> how do i hide a range of columns using column numbers?
>
> something like:
> columns(7,10).hidden = true
>
> --
>
> Gary
>
> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
> news:4580D57C.868C61FE@verizonXSPAM.net...
> > In the activewindow???
> >
> > msgbox activewindow.selectedsheets.count
> >
> >
> >
> > Gary Keramidas wrote:
> >>
> >> how do i determine if more than 1 worksheets is selected?
> >>
> >> --
> >>
> >> Gary
> >
> > --
> >
> > Dave Peterson

--

Dave Peterson

Gary Keramidas

12/14/2006 5:38:00 PM

0

thanks a lot to both of you

--


Gary


"Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
news:45817598.79DD223B@verizonXSPAM.net...
> Here are a couple more:
>
>
> with activesheet
> .range(.columns(7),.columns(10)).hidden = true
> end with
>
> or
>
> activesheet.columns(7).resize(,10-7+1).hidden = true
>
>
> Gary Keramidas wrote:
>>
>> ok, thanks guys, one other question.
>>
>> how do i hide a range of columns using column numbers?
>>
>> something like:
>> columns(7,10).hidden = true
>>
>> --
>>
>> Gary
>>
>> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
>> news:4580D57C.868C61FE@verizonXSPAM.net...
>> > In the activewindow???
>> >
>> > msgbox activewindow.selectedsheets.count
>> >
>> >
>> >
>> > Gary Keramidas wrote:
>> >>
>> >> how do i determine if more than 1 worksheets is selected?
>> >>
>> >> --
>> >>
>> >> Gary
>> >
>> > --
>> >
>> > Dave Peterson
>
> --
>
> Dave Peterson