PC Review


Reply
Thread Tools Rate Thread

Copy data from a changing spreadsheet to a constant spreadsheet

 
 
jonallen51
Guest
Posts: n/a
 
      10th Apr 2008
I have data that is generated every day and is saved to a new
spreadsheet with the name CallListYYYYMMDD.xls. When this data is
saved, I copy all data to another spreadsheet with the name ALTERNATE
LOAD DATE FORM.xls. Once here I have macros to format the sheet like
I need for future use. I have other spreadsheets with macros that
copy from one workbook to another, but they have the same name
everytime data is copied.

My problem that I need help with is the fact that the name of the
original data sheet is constantly changing to match the day that it
was generated.

Any help would be great.

Thanks
Allen
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      10th Apr 2008
Maybe you could have your macro open the file you specify.


Dim CLWkbk as workbook
dim clwkbkname as variant

clwkbkname = application.getopenfilename(filefilter:="Excel Files, *.xls")
if clwkbkname = false then
exit sub 'user hit cancel
end if
set clwkbk = workbooks.open(filename:=clwkbkname)

Then use clwkbk in your code
clwkbk.worksheets(1).range("a1").value = date
clwkbk.worksheets(1).range("a1:x99").copy _
destination:=thisworkbook.worksheets("somesheetnamehere").range("x99")



jonallen51 wrote:
>
> I have data that is generated every day and is saved to a new
> spreadsheet with the name CallListYYYYMMDD.xls. When this data is
> saved, I copy all data to another spreadsheet with the name ALTERNATE
> LOAD DATE FORM.xls. Once here I have macros to format the sheet like
> I need for future use. I have other spreadsheets with macros that
> copy from one workbook to another, but they have the same name
> everytime data is copied.
>
> My problem that I need help with is the fact that the name of the
> original data sheet is constantly changing to match the day that it
> was generated.
>
> Any help would be great.
>
> Thanks
> Allen


--

Dave Peterson
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending a copy of spreadsheet to mailrecipient; mail adress indicatedin a cell in the spreadsheet Snoopy Microsoft Excel Discussion 4 21st Aug 2009 08:02 AM
How do I copy spreadsheet data as shown to another spreadsheet? =?Utf-8?B?dHJhaW5lcjA3?= Microsoft Excel Misc 2 7th Aug 2006 09:39 PM
Changing Text in Both An Excel Spreadsheet and a Spreadsheet's Cha =?Utf-8?B?QWxhbiBTZXh0ZXI=?= Microsoft Excel Worksheet Functions 2 13th Aug 2004 09:06 PM
Copy one spreadsheet into another without activating second spreadsheet's user form P Cheek Microsoft Excel Programming 3 23rd Jul 2003 06:26 PM
Re: How to open another Excel spreadsheet to copy data into current spreadsheet ? Ricky Pang Microsoft Excel Programming 0 13th Jul 2003 01:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:04 AM.