Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
thunderfoot
 
Posts: n/a
Default Import data from files with different names to EXCEL D'base.


I have partly set-up an EXCEL Database which will have a macro to Import
data from files with _*different_names*_.

These files have all been set-up with the same layouts and contain 5
worksheets ... 4 require various inputs by the 'End Users' and 1 has
been set-up so that it has 1 row of information, which is populated by
the Inputs from the other 4 worksheets i.e. by Cell Referencing. This
row of data has been given a 'Named Range' ("Database_Line") in
preparation for the Import into the Database (called "CR Database").

My problem is that the 'End Users' will be giving all sorts of
different names to the files to be Imported from.

What I want to happen within an Import Macro, which will operate from a
'Button' in "CR Database", is that a Dialogue Box will open so that the
Database Operator can Browse/Navigate to the required file, Select it,
then the macro will continue to Import the one 'Named Range'
("Database_Line") of information into "CR Database".

*I have most coding sorted, but I just can't work-out how to get a
Dialogue Box to open, for Browsing/Navigation, and then for the macro
to continue operating once the required file has been selected.
Help!!!!!* .

Most of my Coding is done by using the 'Record Macro' option within
EXCEL, but I can edit/add some coding that 'Record Macro' won't do, so
I do have some limits in understanding coding ...... but, for an
"oldy", I'm learning ;).

Help is desperately needed on this, so if you want any further details
let me know. I'm using EXCEL 2000.


--
thunderfoot
------------------------------------------------------------------------
thunderfoot's Profile: http://www.excelforum.com/member.php...o&userid=17341
View this thread: http://www.excelforum.com/showthread...hreadid=377677

  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Thunderfoot,

Something along the lines of

Sub TryNow()
Dim myBk As Workbook
Set myBk = Workbooks.Open(Application.GetOpenFilename _
(, , "Select the file"))
Range("Database_Line").Copy _
ThisWorkbook.Worksheets(1).Range("A65536").End(xlU p)(2)
myBk.Close False
End Sub

HTH,
Bernie
MS Excel MVP


"thunderfoot"
wrote in message
...

I have partly set-up an EXCEL Database which will have a macro to Import
data from files with _*different_names*_.

These files have all been set-up with the same layouts and contain 5
worksheets ... 4 require various inputs by the 'End Users' and 1 has
been set-up so that it has 1 row of information, which is populated by
the Inputs from the other 4 worksheets i.e. by Cell Referencing. This
row of data has been given a 'Named Range' ("Database_Line") in
preparation for the Import into the Database (called "CR Database").

My problem is that the 'End Users' will be giving all sorts of
different names to the files to be Imported from.

What I want to happen within an Import Macro, which will operate from a
'Button' in "CR Database", is that a Dialogue Box will open so that the
Database Operator can Browse/Navigate to the required file, Select it,
then the macro will continue to Import the one 'Named Range'
("Database_Line") of information into "CR Database".

*I have most coding sorted, but I just can't work-out how to get a
Dialogue Box to open, for Browsing/Navigation, and then for the macro
to continue operating once the required file has been selected.
Help!!!!!* .

Most of my Coding is done by using the 'Record Macro' option within
EXCEL, but I can edit/add some coding that 'Record Macro' won't do, so
I do have some limits in understanding coding ...... but, for an
"oldy", I'm learning ;).

Help is desperately needed on this, so if you want any further details
let me know. I'm using EXCEL 2000.


--
thunderfoot
------------------------------------------------------------------------
thunderfoot's Profile:

http://www.excelforum.com/member.php...o&userid=17341
View this thread: http://www.excelforum.com/showthread...hreadid=377677



  #3   Report Post  
thunderfoot
 
Posts: n/a
Default


Bernie,

Thanks. This bit of coding is nearly what I want. I can work on it to
get it to do exactly what I want.

You sorted my major problem, which was how to get "Select the File"
dialogue box to open then get the macro to continue once the file was
selected.


--
thunderfoot
------------------------------------------------------------------------
thunderfoot's Profile: http://www.excelforum.com/member.php...o&userid=17341
View this thread: http://www.excelforum.com/showthread...hreadid=377677

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
ENTER A FORMULA IN A CELL TO UTILIZE THE IMPORT DATA FUNCTIONS? datachall Excel Worksheet Functions 2 April 26th 05 10:47 AM
create a list of worksheet names (from a single folder, or open files) Drew Excel Discussion (Misc queries) 2 April 15th 05 04:58 PM
I want a window to cell data that conains links to PDF files and . WEATHER TECH. NOT A ROCKET ENGINEER Excel Discussion (Misc queries) 1 February 24th 05 08:21 PM
batch import dat files The Real Jd Excel Discussion (Misc queries) 2 February 16th 05 12:35 PM
Importing .txt data files increases .xls file size BrianJ Excel Discussion (Misc queries) 1 January 29th 05 02:02 PM


All times are GMT +1. The time now is 11:09 PM.

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"