Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Application.FindFile or .GetOpenFileName?

Hi,

I have never used either of the above applications, so am unsure which to
choose. My problem:

I need a user to give the location of a text file, which then opens and is
used as a reference point for the rest of my macro (I am basically converting
text information into spreadsheet information). However, I do not want the
user to go through the text wizard to avoid upsetting the rest of the macro.

I currently get the user to type the location of the text file into a cell
of a spreadsheet, but the above applications would be more user-friendly.
Which one should I use, and what would the syntax be?

Thanks in advance,

Ewan.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Application.FindFile or .GetOpenFileName?

Ewan,
Personally I always used .GetOpenFilename.
Help shows you the way.

nickHK

"ewan7279" wrote in message
...
Hi,

I have never used either of the above applications, so am unsure which to
choose. My problem:

I need a user to give the location of a text file, which then opens and is
used as a reference point for the rest of my macro (I am basically

converting
text information into spreadsheet information). However, I do not want

the
user to go through the text wizard to avoid upsetting the rest of the

macro.

I currently get the user to type the location of the text file into a cell
of a spreadsheet, but the above applications would be more user-friendly.
Which one should I use, and what would the syntax be?

Thanks in advance,

Ewan.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Application.FindFile or .GetOpenFileName?

Hi Nick,

I have read the help, but cannot actually open the file as I need to:

Sub TBTEXTOPEN()

Dim TBTEXTNAME As Variant
TBTEXTNAME = Application.GetOpenFilename("Text Files (*.txt), *.txt")
MsgBox TBTEXTNAME

End Sub

Obviously this will display the name of the file to open in a message box,
but how do I open this file without the user having to go through the text
import wizard?

Thanks,

Ewan.


"NickHK" wrote:

Ewan,
Personally I always used .GetOpenFilename.
Help shows you the way.

nickHK

"ewan7279" wrote in message
...
Hi,

I have never used either of the above applications, so am unsure which to
choose. My problem:

I need a user to give the location of a text file, which then opens and is
used as a reference point for the rest of my macro (I am basically

converting
text information into spreadsheet information). However, I do not want

the
user to go through the text wizard to avoid upsetting the rest of the

macro.

I currently get the user to type the location of the text file into a cell
of a spreadsheet, but the above applications would be more user-friendly.
Which one should I use, and what would the syntax be?

Thanks in advance,

Ewan.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Application.FindFile or .GetOpenFileName?

Nick,

I've done it. Don't know why I couldn't in the first place, but I've done
it. My coffee and sandwich must have woken up my brain...

"ewan7279" wrote:

Hi Nick,

I have read the help, but cannot actually open the file as I need to:

Sub TBTEXTOPEN()

Dim TBTEXTNAME As Variant
TBTEXTNAME = Application.GetOpenFilename("Text Files (*.txt), *.txt")
MsgBox TBTEXTNAME

End Sub

Obviously this will display the name of the file to open in a message box,
but how do I open this file without the user having to go through the text
import wizard?

Thanks,

Ewan.


"NickHK" wrote:

Ewan,
Personally I always used .GetOpenFilename.
Help shows you the way.

nickHK

"ewan7279" wrote in message
...
Hi,

I have never used either of the above applications, so am unsure which to
choose. My problem:

I need a user to give the location of a text file, which then opens and is
used as a reference point for the rest of my macro (I am basically

converting
text information into spreadsheet information). However, I do not want

the
user to go through the text wizard to avoid upsetting the rest of the

macro.

I currently get the user to type the location of the text file into a cell
of a spreadsheet, but the above applications would be more user-friendly.
Which one should I use, and what would the syntax be?

Thanks in advance,

Ewan.




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
Application.GetOpenFilename vs Application.Dialogs(xlDialogsOpen) Paul Martin Excel Programming 5 August 5th 05 04:44 PM
Application.GetOpenFilename Greg[_19_] Excel Programming 3 February 20th 05 01:55 AM
Application.GetOpenFilename Philipp Oberleitner[_2_] Excel Programming 2 July 9th 04 07:29 PM
Application.FindFile KD[_3_] Excel Programming 1 November 25th 03 03:12 PM
Application.GetOpenFileName ptrowe Excel Programming 2 September 11th 03 12:54 PM


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