ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   What is wrong in this Sub? (https://www.excelbanter.com/excel-programming/307351-what-wrong-sub.html)

Michael[_27_]

What is wrong in this Sub?
 
Hi everyone,

I am getting an error in this:

Sub MoveCells()
Columns("b:b").Select
Selection.Cut
Columns("g:g").Select
Current.Selection
Selection.Paste 'Here I am getting the error
End Sub

Anything wrong with "Paste"?

Thanks,
Mike

Frank Kabel

What is wrong in this Sub?
 
Hi
try
Sub MoveCells()
Columns("b:b").cut Destination:=Columns("g:g")
end sub



--
Regards
Frank Kabel
Frankfurt, Germany

"Michael" schrieb im Newsbeitrag
om...
Hi everyone,

I am getting an error in this:

Sub MoveCells()
Columns("b:b").Select
Selection.Cut
Columns("g:g").Select
Current.Selection
Selection.Paste 'Here I am getting the

error
End Sub

Anything wrong with "Paste"?

Thanks,
Mike



Tom Ogilvy

What is wrong in this Sub?
 
Sub MoveCells()
Columns("b:b").Cut Destination:=Columns("G:G")
End Sub

worked for me.

--
Regards,
Tom Ogilvy

"Michael" wrote in message
om...
Hi everyone,

I am getting an error in this:

Sub MoveCells()
Columns("b:b").Select
Selection.Cut
Columns("g:g").Select
Current.Selection
Selection.Paste 'Here I am getting the error
End Sub

Anything wrong with "Paste"?

Thanks,
Mike




Don Guillett[_4_]

What is wrong in this Sub?
 
Sub MoveCells()
Columns("b").Cut Columns("g")
End Sub


--
Don Guillett
SalesAid Software

"Michael" wrote in message
om...
Hi everyone,

I am getting an error in this:

Sub MoveCells()
Columns("b:b").Select
Selection.Cut
Columns("g:g").Select
Current.Selection
Selection.Paste 'Here I am getting the error
End Sub

Anything wrong with "Paste"?

Thanks,
Mike





All times are GMT +1. The time now is 06:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com