Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default problem with import files by excel macro

Hello,

I need to write/record a macro that takes multiple files(UNIX files)on
the local computer and then copy all their content back to a sheet of
the excel and then manipulate the data to generate a report. I
particularly need help with macros that can import multiple files. I
have come across an excel application whose button can prompt a windows
and import ONE file to do similiar thing. However, what I want to do is
more sophisticated. Do you have any idea?? do you have any resources
from the web?? Thx!!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default problem with import files by excel macro

Raven,
here what I use for Excel files. You need to edit for you text files then
"Open" and process each, or import in to Excel:
<Code
Response = Excel.Application.GetOpenFilename("HK Spec Files (*.xls), *.xls",
, "Select the Spec Sheets to cost.", , True)

On Error Resume Next
'As we have set MultiSelect=True, this will error if 1 (or more) files were
selected.
If Response < False Then
'Return to normal error handling
On Error GoTo 0

'As we have set MultiSelect=True, an array of filenames will be returned
even if only 1 file was selected, with LBound=1

FilesSelectedCount = UBound(Response)
'Loop through all selected files
For FileCurrent = 1 To FilesSelectedCount

'Open the required Costs WB
Set WBCosts = Workbooks.Open(Response(FileCurrent), , , ,)
...............Process
Loop
</Code

"Raven" wrote in message
oups.com...
Hello,

I need to write/record a macro that takes multiple files(UNIX files)on
the local computer and then copy all their content back to a sheet of
the excel and then manipulate the data to generate a report. I
particularly need help with macros that can import multiple files. I
have come across an excel application whose button can prompt a windows
and import ONE file to do similiar thing. However, what I want to do is
more sophisticated. Do you have any idea?? do you have any resources
from the web?? Thx!!



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
Import all txt files macro Eva Excel Worksheet Functions 4 December 2nd 09 09:19 PM
problem with import files by excel macro Raven Excel Discussion (Misc queries) 0 January 20th 06 08:23 AM
problem with import files by excel macro Raven Excel Discussion (Misc queries) 0 January 20th 06 08:22 AM
Import CSV files using Macro Mintz87 New Users to Excel 3 August 29th 05 09:48 PM
Import multiple files macro can't find files Steven Rosenberg Excel Programming 1 August 7th 03 01:47 AM


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