referring to columns by number

S

Stefi

Hi All,

I can refer to one column with its number like this:

colNo = 2
Columns(colNo).Delete Shift:=xlToLeft

How can I refer to more than one columns without converting column numbers
to column letters, something like this:

colNoFrom = 2
colNoTo = 5
Columns(colNoFrom:colNoTo).Delete Shift:=xlToLeft

Thanks,
Stefi
 
S

Stefi

Thanks Bob, I didn't think that it can be solved so tricky!
Stefi


„Bob Phillips†ezt írta:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top