View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default tightening up VBA

Columns("F:F").Cut Destination:=Range("A:A")


With Columns("F:F")
.Style = "Comma"
.NumberFormat = _
"_(* #,##0.0_);_(* (#,##0.0);_(* ""-""??_);_(@_)"
End With

--
Regards,
Tom Ogilvy



"Arnold Klapheck" wrote:

I have been able to go from this:
Columns("F:F").Select
Selection.Cut
Columns("A:A").Select
Selection.Insert shift:=xlToRight

to this:
Columns("F:F").Cut
Columns("A:A").Insert shift:=xlToRigh

But when I try to go to this:
Columns("F:F").Cut Destination:=Range("A:A").Insert.shift:=xlToRight

I get an error, any suggestions?

I am also trying to get this to tighten up:
Columns("F:F").Select
Selection.Style = "Comma"
Selection.NumberFormat = "_(* #,##0.0_);_(* (#,##0.0);_(* ""-""??_);_(@_)"

I tried this but the second line dosn't work:
Columns("F:F").Style = "Comma"
Selection.NumberFormat = "_(* #,##0.0_);_(* (#,##0.0);_(* ""-""??_);_(@_)"

thanks for any help.