Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is wrong? robert morris Excel Discussion (Misc queries) 5 February 6th 09 02:37 AM
Insert Calculated Field (wrong Qty*Price = wrong Amount) Edmund Excel Discussion (Misc queries) 8 October 4th 07 12:13 PM
What am I doing wrong? Jeff New Users to Excel 4 March 6th 05 03:05 AM
What am I doing wrong? Jeff Excel Discussion (Misc queries) 6 March 6th 05 03:01 AM
What am I doing wrong? John Petty Excel Programming 4 October 15th 03 06:43 PM


All times are GMT +1. The time now is 12:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"