Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default "Open" or "OpenText"?

The workbook I'm developing opens with a UserForm. I'd like to put an
"About" button on the form that opens a text file that describes its
functions a bit. Does Excel have a provision to open just a "read me" type
file? "Open" looked it was reserved for Excel files, and "OpenText" for
files to parse and import. Is one of these the right one to use, or is
there a better way?

Ed


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default "Open" or "OpenText"?

If you want to open a text file with the intention of doing something with it
OTHER THAN putting the data on a worksheet, look at the VBA commands Open,
Input#, Close, etc.

On Wed, 20 Apr 2005 12:59:24 -0700, "Ed" wrote:

The workbook I'm developing opens with a UserForm. I'd like to put an
"About" button on the form that opens a text file that describes its
functions a bit. Does Excel have a provision to open just a "read me" type
file? "Open" looked it was reserved for Excel files, and "OpenText" for
files to parse and import. Is one of these the right one to use, or is
there a better way?

Ed


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 595
Default "Open" or "OpenText"?

Ed

You can use the Shell function to open it in a certain program, e.g.
Notepad.

?shell("notepad.exe 'C:\Testfile.txt'")

The best thing, IMO, is too make another userform with a scrollable textbox
that has all this info. Then your button just shows this useform.

If you want to get fancy, you could do it in html and use the webbrowser
control on a userform as described here
http://www.dicks-blog.com/archives/2...ng-help-files/

--
Dick Kusleika
Excel MVP
Daily Dose of Excel
www.dicks-blog.com


Ed wrote:
The workbook I'm developing opens with a UserForm. I'd like to put an
"About" button on the form that opens a text file that describes its
functions a bit. Does Excel have a provision to open just a "read
me" type file? "Open" looked it was reserved for Excel files, and
"OpenText" for files to parse and import. Is one of these the right
one to use, or is there a better way?

Ed



  #4   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default "Open" or "OpenText"?

Myrna:

Thanks for the reply. I tried Open with the FSO in
Dim FName As String
Dim num As Integer
num = FreeFile()
FName = "C:\Documents and Settings\myname\Desktop\ROT\TestMe.txt"
Open FName For Random As #num

I saw nothing happen, and tried to walk through it again - the debugger told
me it was already open, but it wasn't visible anywhere, and I couldn't
figure out where to put in a Visible = True property. Can you see what I
did wrong?

Ed

"Myrna Larson" wrote in message
...
If you want to open a text file with the intention of doing something with

it
OTHER THAN putting the data on a worksheet, look at the VBA commands Open,
Input#, Close, etc.

On Wed, 20 Apr 2005 12:59:24 -0700, "Ed"

wrote:

The workbook I'm developing opens with a UserForm. I'd like to put an
"About" button on the form that opens a text file that describes its
functions a bit. Does Excel have a provision to open just a "read me"

type
file? "Open" looked it was reserved for Excel files, and "OpenText" for
files to parse and import. Is one of these the right one to use, or is
there a better way?

Ed




  #5   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default "Open" or "OpenText"?

Dick, it worked great! Thanks.
I had considered the UserForm, but it would seem much easier to replace a
simple text file for updates than to redo the text in a UserForm text box.
Am I missing something?

Ed

"Dick Kusleika" wrote in message
...
Ed

You can use the Shell function to open it in a certain program, e.g.
Notepad.

?shell("notepad.exe 'C:\Testfile.txt'")

The best thing, IMO, is too make another userform with a scrollable

textbox
that has all this info. Then your button just shows this useform.

If you want to get fancy, you could do it in html and use the webbrowser
control on a userform as described here
http://www.dicks-blog.com/archives/2...ng-help-files/

--
Dick Kusleika
Excel MVP
Daily Dose of Excel
www.dicks-blog.com


Ed wrote:
The workbook I'm developing opens with a UserForm. I'd like to put an
"About" button on the form that opens a text file that describes its
functions a bit. Does Excel have a provision to open just a "read
me" type file? "Open" looked it was reserved for Excel files, and
"OpenText" for files to parse and import. Is one of these the right
one to use, or is there a better way?

Ed







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 595
Default "Open" or "OpenText"?

Ed wrote:
Dick, it worked great! Thanks.
I had considered the UserForm, but it would seem much easier to
replace a simple text file for updates than to redo the text in a
UserForm text box. Am I missing something?

No, you're right, it is easier that way. I think the trade-off is how
professional it looks (and how much you care about that.) I think the html
and webbrowswer control is a good alternative because you can replace the
html file without changing the code.

If you want the best of both worlds, take Myrna's advice. Put your info in
a text file, then use VBA's text file keywords to read the text and insert
it in the textbox. It's a little more work up front coding all of that.

Dick


  #7   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default "Open" or "OpenText"?

If you want the best of both worlds, take Myrna's advice. Put your info
in
a text file, then use VBA's text file keywords to read the text and insert
it in the textbox. It's a little more work up front coding all of that.

That does sound best, especially since I apparently managed to get the file
open (even though I thought it wasn't working because I couldn't see it).
Now I just have to figure out how to read it into a string. I think I
remember something about that in either a Help file, KB article, or previous
post - probably all three! But of course, that wasn't the answer I was
looking for so I blew right past it! Well, I can go find it again!

Thanks for the help, Dick.
Ed

"Dick Kusleika" wrote in message
...
Ed wrote:
Dick, it worked great! Thanks.
I had considered the UserForm, but it would seem much easier to
replace a simple text file for updates than to redo the text in a
UserForm text box. Am I missing something?

No, you're right, it is easier that way. I think the trade-off is how
professional it looks (and how much you care about that.) I think the

html
and webbrowswer control is a good alternative because you can replace the
html file without changing the code.

If you want the best of both worlds, take Myrna's advice. Put your info

in
a text file, then use VBA's text file keywords to read the text and insert
it in the textbox. It's a little more work up front coding all of that.

Dick




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 595
Default "Open" or "OpenText"?

Ed

You can find most of the keywords you need here

http://www.dicks-blog.com/archives/2...h-a-text-file/

like Open, Print, Input. Then check them out in help to get a description.

--
Dick Kusleika
Excel MVP
Daily Dose of Excel
www.dicks-blog.com

Ed wrote:
If you want the best of both worlds, take Myrna's advice. Put your
info in a text file, then use VBA's text file keywords to read the
text and insert it in the textbox. It's a little more work up front
coding all of that.

That does sound best, especially since I apparently managed to get
the file open (even though I thought it wasn't working because I
couldn't see it). Now I just have to figure out how to read it into a
string. I think I remember something about that in either a Help
file, KB article, or previous post - probably all three! But of
course, that wasn't the answer I was looking for so I blew right past
it! Well, I can go find it again!

Thanks for the help, Dick.
Ed

"Dick Kusleika" wrote in message
...
Ed wrote:
Dick, it worked great! Thanks.
I had considered the UserForm, but it would seem much easier to
replace a simple text file for updates than to redo the text in a
UserForm text box. Am I missing something?

No, you're right, it is easier that way. I think the trade-off is
how professional it looks (and how much you care about that.) I
think the html and webbrowswer control is a good alternative because
you can replace the html file without changing the code.

If you want the best of both worlds, take Myrna's advice. Put your
info in a text file, then use VBA's text file keywords to read the
text and insert it in the textbox. It's a little more work up front
coding all of that.

Dick



  #9   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default "Open" or "OpenText"?

Thank you very much! I appreciate the boost.
Ed

"Dick Kusleika" wrote in message
...
Ed

You can find most of the keywords you need here


http://www.dicks-blog.com/archives/2...h-a-text-file/

like Open, Print, Input. Then check them out in help to get a

description.

--
Dick Kusleika
Excel MVP
Daily Dose of Excel
www.dicks-blog.com

Ed wrote:
If you want the best of both worlds, take Myrna's advice. Put your
info in a text file, then use VBA's text file keywords to read the
text and insert it in the textbox. It's a little more work up front
coding all of that.

That does sound best, especially since I apparently managed to get
the file open (even though I thought it wasn't working because I
couldn't see it). Now I just have to figure out how to read it into a
string. I think I remember something about that in either a Help
file, KB article, or previous post - probably all three! But of
course, that wasn't the answer I was looking for so I blew right past
it! Well, I can go find it again!

Thanks for the help, Dick.
Ed

"Dick Kusleika" wrote in message
...
Ed wrote:
Dick, it worked great! Thanks.
I had considered the UserForm, but it would seem much easier to
replace a simple text file for updates than to redo the text in a
UserForm text box. Am I missing something?

No, you're right, it is easier that way. I think the trade-off is
how professional it looks (and how much you care about that.) I
think the html and webbrowswer control is a good alternative because
you can replace the html file without changing the code.

If you want the best of both worlds, take Myrna's advice. Put your
info in a text file, then use VBA's text file keywords to read the
text and insert it in the textbox. It's a little more work up front
coding all of that.

Dick





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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
conditional formula to show "open" or "closed" SBS Excel Worksheet Functions 6 January 28th 06 01:48 AM


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