Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Cesar_us
 
Posts: n/a
Default Help with Excel Macro.

I am very new to writing macros and very green.

I have the following macro to copy and paste a column of cells.

Sub copypaste()
'
' copypaste Macro
' Macro recorded 6/22/2005 by
'
' Keyboard Shortcut: Ctrl+q
'
Range("AD3:BF3").Select
Selection.Copy
Range("AD19:BF19").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
End Sub


In the line [Range("AD19:BF19").Select] is there any way I can get it paste
it in the Active Cell of choice.

Thanks,

Cesar.
  #2   Report Post  
JMB
 
Posts: n/a
Default

Sub test3()
Range("AD3:BF3").Copy
ActiveCell.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False

End Sub

Just don't select range AD3:BF3, then the activecell will not change.


"Cesar_us" wrote:

I am very new to writing macros and very green.

I have the following macro to copy and paste a column of cells.

Sub copypaste()
'
' copypaste Macro
' Macro recorded 6/22/2005 by
'
' Keyboard Shortcut: Ctrl+q
'
Range("AD3:BF3").Select
Selection.Copy
Range("AD19:BF19").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
End Sub


In the line [Range("AD19:BF19").Select] is there any way I can get it paste
it in the Active Cell of choice.

Thanks,

Cesar.

  #3   Report Post  
Cesar_us
 
Posts: n/a
Default

Just curious. Why the line of code "Application.CutCopyMode = False".

Thanks

"JMB" wrote:

Sub test3()
Range("AD3:BF3").Copy
ActiveCell.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False

End Sub

Just don't select range AD3:BF3, then the activecell will not change.


"Cesar_us" wrote:

I am very new to writing macros and very green.

I have the following macro to copy and paste a column of cells.

Sub copypaste()
'
' copypaste Macro
' Macro recorded 6/22/2005 by
'
' Keyboard Shortcut: Ctrl+q
'
Range("AD3:BF3").Select
Selection.Copy
Range("AD19:BF19").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
End Sub


In the line [Range("AD19:BF19").Select] is there any way I can get it paste
it in the Active Cell of choice.

Thanks,

Cesar.

  #4   Report Post  
JMB
 
Posts: n/a
Default

when you copy and paste items in Excel, you usually have to hit the ESC key
to cancel the copy mode (clear the dashes that appear around your copy
range). that's what that line does. Put an apostrophe ' in front of that
line of code, then run it and look at AD3:BF3.

"Cesar_us" wrote:

Just curious. Why the line of code "Application.CutCopyMode = False".

Thanks

"JMB" wrote:

Sub test3()
Range("AD3:BF3").Copy
ActiveCell.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False

End Sub

Just don't select range AD3:BF3, then the activecell will not change.


"Cesar_us" wrote:

I am very new to writing macros and very green.

I have the following macro to copy and paste a column of cells.

Sub copypaste()
'
' copypaste Macro
' Macro recorded 6/22/2005 by
'
' Keyboard Shortcut: Ctrl+q
'
Range("AD3:BF3").Select
Selection.Copy
Range("AD19:BF19").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
End Sub


In the line [Range("AD19:BF19").Select] is there any way I can get it paste
it in the Active Cell of choice.

Thanks,

Cesar.

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
Saving Excel using Macro mrbalaje Excel Discussion (Misc queries) 4 April 20th 05 02:32 PM
How do I find a Macro in Excel when I don't know its name? LLEECEE Excel Discussion (Misc queries) 2 March 31st 05 10:28 PM
How can I edit cell contents with a macro in Excel? Mind the gaps! Excel Discussion (Misc queries) 2 March 23rd 05 08:51 PM
Problem Editing Macro in Shared Excel File [email protected] Excel Discussion (Misc queries) 1 March 19th 05 06:43 PM
Open Access Database under and Excel window using a Macro BMSpell Excel Worksheet Functions 1 January 8th 05 05:32 PM


All times are GMT +1. The time now is 10:58 AM.

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

About Us

"It's about Microsoft Excel"