Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default macro to copy cells from one workbook to another


I am trying to write a macro that will copy cells from one workbook to
another. The catch is that the name of the source workbook may have
been changed from when it was originally saved, so the macro can not
refer to the source workbook by name.

I have a work-around macro I run from my source workbook that copies
cells from my source workbook to a temp.xls file, then I copy from
temp.xls to my desitnation workbook (file name is known), but then I
need to be able to delete the temp.xls workbook from my macro that I am
running from my source workbook. What is the macro command to delete a
xls file?


--
mwc0914
------------------------------------------------------------------------
mwc0914's Profile: http://www.excelforum.com/member.php...o&userid=24130
View this thread: http://www.excelforum.com/showthread...hreadid=486912

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default macro to copy cells from one workbook to another

Sub deletemap()
'Delete the file Temp.xls form the harddisk
Kill "C:\Temp.xls"
End Sub

Is this what you want???

--
Ronald Ferdinandus
http://www.ro-pay.nl


"mwc0914" wrote:


I am trying to write a macro that will copy cells from one workbook to
another. The catch is that the name of the source workbook may have
been changed from when it was originally saved, so the macro can not
refer to the source workbook by name.

I have a work-around macro I run from my source workbook that copies
cells from my source workbook to a temp.xls file, then I copy from
temp.xls to my desitnation workbook (file name is known), but then I
need to be able to delete the temp.xls workbook from my macro that I am
running from my source workbook. What is the macro command to delete a
xls file?


--
mwc0914
------------------------------------------------------------------------
mwc0914's Profile: http://www.excelforum.com/member.php...o&userid=24130
View this thread: http://www.excelforum.com/showthread...hreadid=486912


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
Macro to copy an image (or picture) from one workbook to a new sheetin another workbook Ruchir Excel Worksheet Functions 1 July 25th 08 07:29 AM
Copy cells based on conditions in one workbook to another workbook fLiPMoD£ Excel Worksheet Functions 0 August 1st 07 07:43 PM
Macro to copy specific cells from one workbook to another [email protected] Excel Discussion (Misc queries) 4 June 9th 06 04:32 PM
Need a macro to copy a range in one workbook and paste into another workbook Paul Excel Programming 8 July 1st 04 07:42 AM
Copy a range of cells in an unopened workbook and paste it to the current workbook topstar Excel Programming 3 June 24th 04 12:50 PM


All times are GMT +1. The time now is 08:49 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"