Thread: Macro Writing
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary L Brown Gary L Brown is offline
external usenet poster
 
Posts: 219
Default Macro Writing

Can we assume that there's only one worksheet in each workbook?
--
Gary Brown


"MSHO" wrote:

I have been trying to write this macro for quite some time now. I've received
much help already but keep getting stuck. I'm just going to lay it out and
maybe someone knows how the code will work?

I have files for different services, and for every year there is the same
service with different data. Therefore, there are folders for every year, and
in them the different kinds of service. I need to compare the data from two
years for the same service. The problem is, the service files have all the
same name for each year, i.e. 'Service 1' in 2001 and 'Service 1' in 2000. I
want to be able to open up excel and import my macro. I then want it to
prompt for the file name (what service) and what two years it wants to
compare. I know it cant have the same file name open at a time for two
different files, so i want to be able to copy and paste the worksheet into
the excel file i have open, then close and then open the second year's file.

I am having so much trouble getting these files to open. If anyone can help
it would be greatly appreciated.


MSHO