Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default problem selecting entire column

once again, i'm having a problem selecting an entire column(s):
the following code consistently selects more columns than i want:


Columns("E:R").Select
With Selection
.columnwidth = 10.25
.EntireColumn.Hidden = False
End With
Columns("S:T").Select
With Selection
.EntireColumn.Hidden = True
End With
Columns("U:U").Select
With Selection
.columnwidth = 13
End With

as always, thanks in advance
mark


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 634
Default problem selecting entire column

No need to select at all:-

Sub Cols()

With Columns("E:R")
.ColumnWidth = 10.25
.EntireColumn.Hidden = False
End With

With Columns("S:T")
.EntireColumn.Hidden = True
End With

With Columns("U:U")
.ColumnWidth = 13
End With

End Sub

or

Sub Cols()

With Columns("E:R")
.ColumnWidth = 10.25
.EntireColumn.Hidden = False
End With

Columns("S:T").EntireColumn.Hidden = True
Columns("U:U").ColumnWidth = 13

End Sub

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



"mark kubicki" wrote in message
...
once again, i'm having a problem selecting an entire column(s):
the following code consistently selects more columns than i want:


Columns("E:R").Select
With Selection
.columnwidth = 10.25
.EntireColumn.Hidden = False
End With
Columns("S:T").Select
With Selection
.EntireColumn.Hidden = True
End With
Columns("U:U").Select
With Selection
.columnwidth = 13
End With

as always, thanks in advance
mark




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.594 / Virus Database: 377 - Release Date: 24/02/2004


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Delete entire rows by selecting different text in column A Doug[_5_] Excel Discussion (Misc queries) 2 November 20th 09 02:03 PM
Row-Entire row changes color (and stays) selecting first entry Harry's GMail World Excel Discussion (Misc queries) 3 May 11th 08 09:56 AM
i want to highlight entire row when selecting a cell in that row Dino Excel Discussion (Misc queries) 12 March 30th 08 03:59 AM
Keyboard shortcut or selecting entire column Precious_Stone Excel Worksheet Functions 2 July 18th 06 05:37 PM
Macro for selecting entire row from mouse cell selection PaiolaS Excel Programming 1 August 7th 03 07:01 PM


All times are GMT +1. The time now is 08:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"