LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
MWS MWS is offline
external usenet poster
 
Posts: 53
Default Importing Data Via A Macro

I need to write a macro to import data from potentially several different
files and need it to be dynamic enough for the user to select the file they
need. Part of the code I originally used was:

' Keyboard Shortcut: Ctrl+r
'
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;W:\Pending_Oppty_Report\manager_rejected_010 32005_400a.txt",
Destination _
:=Range("A1"))
.Name = "manager_rejected_01032005_400a"

The issue I'm having is that this hard-code only imports data from the
"manager_rejected_01032005_400a" file and I need to have the macro allow the
user to select any file within the directory. I think I need to "pause" the
macro, allow the user to select a file and then resume the importing of the
data, but am having major problems in completely this - please help.

Any and All Help Is Appreciated - Thank You
 
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
Importing data via macro Liz New Users to Excel 1 April 23rd 07 09:44 PM
Importing Data - Macro or Script Norgbort Machine Excel Worksheet Functions 0 May 3rd 06 09:53 PM
importing 10 sets of data with a macro chris_rip[_2_] Excel Programming 0 July 19th 05 05:04 PM
importing data using a macro chris_rip Excel Discussion (Misc queries) 0 July 18th 05 08:42 PM
importing data using a macro Jo[_5_] Excel Programming 1 August 20th 03 01:08 PM


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