ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   quick question (https://www.excelbanter.com/excel-programming/379395-quick-question.html)

Gary Keramidas

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

--


Gary




Dave Peterson

quick question
 
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

quick question
 
Gary,

MsgBox ThisWorkbook.Windows(1).SelectedSheets.Count

NickHK

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
how do i determine if more than 1 worksheets is selected?

--


Gary






Gary Keramidas

quick question
 
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" wrote in message
...
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[_2_]

quick question
 
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
...
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" wrote in message
...
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

quick question
 
Here are a couple mo


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" wrote in message
...
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

quick question
 
thanks a lot to both of you

--


Gary


"Dave Peterson" wrote in message
...
Here are a couple mo


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" wrote in message
...
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





All times are GMT +1. The time now is 03:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com