Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Pasting a range of information from a foler on F Drive to anotherfolder on same drive

Oops. Thanks for the correction.

Tom Ogilvy wrote:

This line appears to have a typo:

<<snipped

--

Dave Peterson

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
Folder Network drive Wanna Learn Excel Discussion (Misc queries) 1 May 30th 08 06:42 PM
Links to mapped drive change to refer to local hard drive SueD Links and Linking in Excel 1 May 8th 08 11:42 AM
add a folder to c:\ drive from cell A1 contents... [email protected] Excel Discussion (Misc queries) 1 July 25th 06 09:48 PM
Can I save to hard drive AND my flash drive at the same time? Gizelle Excel Discussion (Misc queries) 3 July 24th 06 08:27 PM
Find links with code; change from G drive to C drive Sandy[_3_] Excel Programming 4 July 26th 03 07:24 PM


All times are GMT +1. The time now is 08:02 PM.

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"