LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 225
Default macro which copies data from a 2nd WB, The WB has a new name each

wbName = Format(Date, "mmm-dd") & ".xls"
will give you the workbookname in the vairable wbName

Try this to get the value in A1 from Mar-28.xls (if run today) Sheet1 A1
into the current worksheet A1
Sub getValue()
wbname = Format(Date, "mmm-dd") & ".xls"
ThisWorkbook.ActiveSheet.Cells(1, 1) =
Workbooks(wbname).Worksheets("Sheet1").Cells(1, 1)
End Sub

"Dick (Learning To Write Macros)" wrote:

I would like to write a marco in one Workbook (Master.xls), which copies data
from cells in another open Workbook (Data March-28.xls). This second
Workbook changes it's name each day to: Data March-29.xls, Data March-30.xls,
etc.

Thanx For Your Help

 
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
Hyperlink that copies Data Ram02Escort Excel Worksheet Functions 0 April 7th 08 03:19 AM
how to write a macro that copies adjustable hyperlinks into a sprd BROCK8292 Excel Discussion (Misc queries) 3 September 21st 07 06:18 PM
Macro or Formula that copies and moves data? A.S. Excel Discussion (Misc queries) 1 December 21st 06 03:28 PM
A Macro that Copies from Excel & Pastes into a webpage Eric Excel Discussion (Misc queries) 1 July 14th 06 12:38 AM
Keyboard Macro Just Copies Content of Previous Cell Andy Excel Discussion (Misc queries) 1 October 24th 05 11:54 PM


All times are GMT +1. The time now is 12:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"