Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi , I am using the next line :
ActiveWorkbook.Worksheets("A").Columns((ConvertToL etter(inicol)) & ":" & msConvertToLetter(endcol)).Select Does exist some way for using only the Column Number ? I would prefer don´t use the function ConvertToLetter. Thank you in advance. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveWorkbook.Worksheets("A").Columns((ConvertToL etter(inicol)) & ":" &
msConvertToLetter(endcol)).Select Does exist some way for using only the Column Number ? I would prefer don´t use the function ConvertToLetter. Well, you could always do what ConvertToLetter does directly in your code... ActiveWorkbook.Worksheets("A").Columns(Chr(IniCol + 64) & ":" & Chr(EndCol + 64)).Select Rick |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveWorkbook.Worksheets("A").Columns((ConvertToL etter(inicol)) & ":" &
msConvertToLetter(endcol)).Select You could do it this way: ActiveWorkbook.Worksheets("A").Range(Cells(1, inicol), Cells(65536, endcol).Select "Angeles" wrote: Hi , I am using the next line : ActiveWorkbook.Worksheets("A").Columns((ConvertToL etter(inicol)) & ":" & msConvertToLetter(endcol)).Select Does exist some way for using only the Column Number ? I would prefer don´t use the function ConvertToLetter. Thank you in advance. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveWorkbook.Worksheets("A").Columns((ConvertToL etter(inicol)) & ":" &
msConvertToLetter(endcol)).Select Does exist some way for using only the Column Number ? I would prefer don´t use the function ConvertToLetter. Well, you could always do what ConvertToLetter does directly in your code... ActiveWorkbook.Worksheets("A").Columns(Chr(IniCol + 64) & ":" & Chr(EndCol + 64)).Select I can't help feeling there is a more direct method that I am simply overlooking; but, anyway, here is another way to do it... ActiveWorkbook.Worksheets("A").Columns(IniCol).Res ize(Rows.Count, EndCol - IniCol).Select Rick |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Range(Columns(2), Columns(10)).Select
Mike F "Angeles" wrote in message ... Hi , I am using the next line : ActiveWorkbook.Worksheets("A").Columns((ConvertToL etter(inicol)) & ":" & msConvertToLetter(endcol)).Select Does exist some way for using only the Column Number ? I would prefer don´t use the function ConvertToLetter. Thank you in advance. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveWorkbook.Worksheets("A").Columns(IniCol).Res ize(Rows.Count, EndCol -
IniCol).Select I forgot the +1... ActiveWorkbook.Worksheets("Sheet1").Columns(IniCol ).Resize(Rows.Count, EndCol - IniCol + 1).Select Rick |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Using your variables Dimmed As Long:
Range(Columns(inicol), Columns(endcol)).Select Mike F "Mike Fogleman" wrote in message ... Range(Columns(2), Columns(10)).Select Mike F "Angeles" wrote in message ... Hi , I am using the next line : ActiveWorkbook.Worksheets("A").Columns((ConvertToL etter(inicol)) & ":" & msConvertToLetter(endcol)).Select Does exist some way for using only the Column Number ? I would prefer don´t use the function ConvertToLetter. Thank you in advance. |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See my responses Rick.
Mike Fogleman "Rick Rothstein (MVP - VB)" wrote in message ... ActiveWorkbook.Worksheets("A").Columns((ConvertToL etter(inicol)) & ":" & msConvertToLetter(endcol)).Select Does exist some way for using only the Column Number ? I would prefer don´t use the function ConvertToLetter. Well, you could always do what ConvertToLetter does directly in your code... ActiveWorkbook.Worksheets("A").Columns(Chr(IniCol + 64) & ":" & Chr(EndCol + 64)).Select I can't help feeling there is a more direct method that I am simply overlooking; but, anyway, here is another way to do it... ActiveWorkbook.Worksheets("A").Columns(IniCol).Res ize(Rows.Count, EndCol - IniCol).Select Rick |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks... see, I knew I was missing something obvious.
Rick "Mike Fogleman" wrote in message m... See my responses Rick. Mike Fogleman "Rick Rothstein (MVP - VB)" wrote in message ... ActiveWorkbook.Worksheets("A").Columns((ConvertToL etter(inicol)) & ":" & msConvertToLetter(endcol)).Select Does exist some way for using only the Column Number ? I would prefer don´t use the function ConvertToLetter. Well, you could always do what ConvertToLetter does directly in your code... ActiveWorkbook.Worksheets("A").Columns(Chr(IniCol + 64) & ":" & Chr(EndCol + 64)).Select I can't help feeling there is a more direct method that I am simply overlooking; but, anyway, here is another way to do it... ActiveWorkbook.Worksheets("A").Columns(IniCol).Res ize(Rows.Count, EndCol - IniCol).Select Rick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Reference columns using For each r in currentregion | Excel Programming | |||
how do I sumif using 3 reference columns? | Excel Worksheet Functions | |||
how do I sum using 3 reference columns? | Excel Worksheet Functions | |||
How do I sum with 3 reference columns? | Excel Worksheet Functions | |||
Using variables to reference columns in VBA | Excel Programming |