Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You could try
Sub ColSelect Dim Col1St As String Dim Col1Fin As String Dim Col2St As String Dim Col2Fin As String Col1St = "H" Col1Fin = "H" Col2St = "A" Col2Fin = "F" Range(Col1St & ":" & Col1Fin & "," & Col2St & ":" & Col2Fin).Select End Sub Or are you trying to record what someone selects? "Cesar Zapata" wrote in message ... Hi, this looks easey but is 3:45 PM and I dont think to well after 3:00 pM :) what I'm trying to is to select columns. Range("H:H,A:F").Select this is what the macro recorded does but the HH can change anytime so I'm trying to it with VBA like this: col = ActiveCell.EntireColumn.Address Range("ActiveCell.EntireColumn.Address,A:F").Selec t or range(activecell.column,"A:F").select this selects all the columsn from A,F to whater the acticell is but it does not jump. for example if I just want to select A:F and AZ it does not work. can you please help? Thanks cesar ' |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks that worked great!
"John Gittins" wrote in message ... You could try Sub ColSelect Dim Col1St As String Dim Col1Fin As String Dim Col2St As String Dim Col2Fin As String Col1St = "H" Col1Fin = "H" Col2St = "A" Col2Fin = "F" Range(Col1St & ":" & Col1Fin & "," & Col2St & ":" & Col2Fin).Select End Sub Or are you trying to record what someone selects? "Cesar Zapata" wrote in message ... Hi, this looks easey but is 3:45 PM and I dont think to well after 3:00 pM :) what I'm trying to is to select columns. Range("H:H,A:F").Select this is what the macro recorded does but the HH can change anytime so I'm trying to it with VBA like this: col = ActiveCell.EntireColumn.Address Range("ActiveCell.EntireColumn.Address,A:F").Selec t or range(activecell.column,"A:F").select this selects all the columsn from A,F to whater the acticell is but it does not jump. for example if I just want to select A:F and AZ it does not work. can you please help? Thanks cesar ' |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
This has to be easy. | Charts and Charting in Excel | |||
pls help, is there an easy way to | Excel Worksheet Functions | |||
Should be easy, but... | Excel Worksheet Functions | |||
Very easy I'm sure | Excel Discussion (Misc queries) | |||
new user with easy question? not easy for me | New Users to Excel |