Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pasting a range of information from a foler on F Drive to another folder on same drive
This line appears to have a typo:
.range("a1",.range("a65536").end(xlup)(1,4).name = "Jimmy" should be: .range("a1",.range("a65536").end(xlup)(1,4)).name = "Jimmy" and is repeated: .range("a1",.range("a65536").end(xlup)(1,4).copy _ which should be .range("a1",.range("a65536").end(xlup))(1,4).copy _ Of course, if the range named Jimmy is already defined, you wouldn't need to redefine it using the code. You have said to paste both to 1100 and 1107. In windows, separators are back slashes F:\Nave\PGAM NT based machines seem to be more resiliant with respect to this than windows 9x machines. -- Regards, Tom Ogilvy Dave Peterson wrote in message ... Are all the files open? If not, record a macro when you open it to get that code. Then (I think) something like: with workbooks("arbitrage.xls") .range("a1",.range("a65536").end(xlup)(1,4).name = "Jimmy" .range("jimmy").copy _ destination:=workbooks("PGAM.xls") _ .worksheets("whatworksheet").range("a1100") end with But you didn't need to name the range. You could have just copied it directly: with workbooks("arbitrage.xls") .range("a1",.range("a65536").end(xlup)(1,4).copy _ destination:=workbooks("PGAM.xls") _ .worksheets("whatworksheet").range("a1100") end with And when you're adjusting the code, the drive and folder don't go inside the workbooks(----) code. It's just the filename itself. (But both files have to be open for this to work.) "Steven R. Berke" wrote: I have a file on the F:/Drive in a directory named PRU whose name is Arbitrage. With the command below labeled "A" I have selected the range I want to copy from the Directory PRU to a file named PGAM which is on the F:Drive in the Directory Nave(i.e. F:/Nave/PGAM). I want the range which is named "Jimmy" in the PRU directory to be pasted into Column A row 1107 of the file named PGAM in the NAVE directory of the F Drive. What commands should I used to paste the range named "Jimmy" into row A1100 of the PGAM file Range("A1", Range("A65536").End(xlUp)(1, 4)).name = "Jimmy" '(LABEL A) Range("Jimmy").Select -- Dave Peterson |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pasting a range of information from a foler on F Drive to anotherfolder on same drive
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Folder Network drive | Excel Discussion (Misc queries) | |||
Links to mapped drive change to refer to local hard drive | Links and Linking in Excel | |||
add a folder to c:\ drive from cell A1 contents... | Excel Discussion (Misc queries) | |||
Can I save to hard drive AND my flash drive at the same time? | Excel Discussion (Misc queries) | |||
Find links with code; change from G drive to C drive | Excel Programming |