Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-08-2011, 01:10 AM
macropod's Avatar
macropod macropod is offline Optional File Browsing Windows 7 32bit Optional File Browsing Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Here's one way:


Code:
Dim strFile As String
strFile = "C:\Users\BK\Desktop\DATA.txt"
With Application.FileDialog(msoFileDialogFilePicker)
  .AllowMultiSelect = False
  .Show
  If .SelectedItems.Count = 1 Then
    strFile = .SelectedItems(1)
  Else
    MsgBox "No file selected", vbExclamation
    Exit Sub
  End If
End If
'IMPORT the file from desktop (DATA.txt)
    With ActiveSheet.QueryTables.Add(Connection:= _
        "TEXT;" & strFile, Destination:=Range("$A$1"))
     ...
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
browser window, ease-of-use, import



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! Find text in doc file & copy to another file northstarman Word 1 11-05-2010 08:15 AM
Optional File Browsing Word Macro: Save file as text with current file name jabberwocky12 Word VBA 2 10-22-2010 12:23 PM
linking a word file and an excell file on a macbook pro Fleur Office 0 07-14-2010 08:19 PM
Optional File Browsing How to open ppt file directly with slide show when clicked on file. praveen_p PowerPoint 1 05-06-2009 12:42 PM
Outlook xp slow when Browsing to attached a file jmelgar1 Outlook 0 09-23-2008 01:49 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:12 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft