Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Selecting the range before copying it (via the Copy method) is not
required... your originally posted code works fine as written. However, I think the OP wants the copy process to work with the currently selected cell(s), not a preselected range. I'd change your code to something like this... Sub select_copy() Selection.Copy Destination:=ActiveSheet.Range("D3") 'change to suit End Sub Rick "Susan" wrote in message ... (actually, i forgot the select, i'm so used to not using them! just add in myFirstRange.select before the copy/paste business). susan On May 16, 12:43 pm, Susan wrote: for a macro solution, try: ========================== Option Explicit Sub select_copy() Dim wb As Workbook Dim ws As Worksheet Dim myFirstRange As Range Dim mySecondRange As Range Set wb = ActiveWorkbook Set ws = ActiveSheet Set myFirstRange = ws.Range("B3") 'change range to suit Set mySecondRange = ws.Range("D3") 'change range to suit myFirstRange.Copy Destination:=mySecondRange End Sub ==================================== hth susan On May 16, 12:21 pm, Rv wrote: i'm tring to to be able to slect a cell and have and the information (in the cell) copied to another designated cell.- Hide quoted text - - Show quoted text - |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Move cell info and info in neighboring cell on new entry | Excel Discussion (Misc queries) | |||
NEED VBA TO SELECT A CELL; NOTE THE CELL VALUE;COPYADJ CELL;FIND CELL VALUE IN A RANGE AND SO ON | Excel Programming | |||
Send Xl Cell info to Word | Excel Programming | |||
how to send xls cell info to a word template | Excel Worksheet Functions | |||
How to create/run "cell A equals Cell B put Cell C info in Cell D | Excel Discussion (Misc queries) |