Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Gathering info from saved files

Hey again,

I have another newbie question for you all.

Ok, so there is an excel spreadsheet that one part of my office save
daily with personal information such as company name, address, taxes
proceeds and whatnot. Lets say the name of the file is always:

"recon 1 18 04" (the current date at the end)

There are workbooks that I use daily that are different for ever
company that we work with. So I usually have to open my workbook, dum
the recon spreadsheet into its own sheet in my workbook, take th
information pertaining to the company that im currently working on an
use that info to populate fields in my workbook.

I would like to add a button to my toolbar that would grab the reco
file from where it is always saved (lets just say C:/reports/ ..) dum
the information into my workbook as its own sheet and take the inf
with the companys name that im working on and populate the field
corresponding to that information.

I hope I was descriptive enough.

Thanks

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 100
Default Gathering info from saved files

Hi

The following should get you going. It assumes that you are starting in the file that you want to import the sheet into. It will request the name of the sheet (excl the recon constant). This could be changed to be based on the current date if so required. It will transfer the sheet (called recon as you did not detail) into the current sheet. As recon is the only sheet in the workbook, it will automatically close without saving.

You have not given any detail on what info you want where, so that aspect has not been covered.

To make this associated with a button, put the code into its own workbook, save the workbook, then save again as an xla file (addin). Go to tools, addins, browse to find the file and include. Make sure that it is selected. You can then create an icon on the toolbar, and associate it with the macro in the addin.

Tony

ChDir "c:\reports"
curfile = ActiveWorkbook.Name
recfile = InputBox("Enter date of file", , "1 14 04")
Workbooks.Open FileName:="recon " & recfile
Sheets("recon").Move After:=Workbooks(curfile).Sheets(1)

----- rxwillow wrote: -----

Hey again,

I have another newbie question for you all.

Ok, so there is an excel spreadsheet that one part of my office saves
daily with personal information such as company name, address, taxes,
proceeds and whatnot. Lets say the name of the file is always:

"recon 1 18 04" (the current date at the end)

There are workbooks that I use daily that are different for every
company that we work with. So I usually have to open my workbook, dump
the recon spreadsheet into its own sheet in my workbook, take the
information pertaining to the company that im currently working on and
use that info to populate fields in my workbook.

I would like to add a button to my toolbar that would grab the recon
file from where it is always saved (lets just say C:/reports/ ..) dump
the information into my workbook as its own sheet and take the info
with the companys name that im working on and populate the fields
corresponding to that information.

I hope I was descriptive enough.

Thanks.


---
Message posted from http://www.ExcelForum.com/


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
i deleted info in excel then saved. can i recover deleted info? jbhtbruce Excel Discussion (Misc queries) 2 May 25th 10 08:54 AM
Using codes to input saved info into a cell? chris1982 New Users to Excel 1 December 30th 09 06:37 PM
Gathering Info on one sheet albertmb Excel Discussion (Misc queries) 1 December 6th 09 09:27 AM
Files saved as csv files are actually saved as text files? Queen_Of_Thebes[_2_] Excel Discussion (Misc queries) 2 May 19th 09 03:04 PM
Gathering info from a set of excel files Remy[_2_] Excel Programming 0 October 31st 03 02:54 AM


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