Archive of Mr Excel Message Board


Back to Controls in Excel archive index
Back to archive home

columns name

Posted by amroo on August 22, 2001 12:05 AM
Hi everybody,
I have a list of letter in a combobox, when i click on one, i get the letter in Range("AX1"), so i want the columns nammed as the letter to be selected.
This is a part of my macro.
Col = Range("AX1").Value
Columns(" & Col:Col & ").Select
i wrote this but there is a mistake in the second line, can someone help me?
amroo

Re: columns name

Posted by Alex on August 22, 2001 7:16 AM


Amroo,

Try making the second line as follows-
Columns(" & Col & ":" & Col & ").Select

Alternatively, if it's always just the one column, you probably only need-
Columns(" & Col & ").Select

Alex


Thanks Alex, but !!!!

Posted by amroo on August 23, 2001 11:09 PM


This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.