Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Print / Write to text file and usage of buttons

Hi gurus

I need to make an Excel vba to write to a log text file usage of
certain buttons on a userform.

So, when user clicks a button called "button1" on "userform1" this
information should be added in the end of text file with date and
username.
There are two problems I can't solve and need you help with.
a) how to write an event to a userform so that any button clicked runs
program to save to log file.
b) how to append to the file. I have used print and write for other
purposes, but this should append and not overwrite.

This is against news rules, but could you pls send your comments to
jari.toukkari...jippii.fi because I have a limited access to news
groups.

Thanks in advance.
Jari

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Print / Write to text file and usage of buttons

instead of
Open "C:\FILEIO\TEXTFILE.TXT" For Input As #1
use

Open "C:\FILEIO\TEXTFILE.TXT" For append As #1

In the click event of each button, call the procedure that writes the file.



--
Regards,
Tom Ogilvy



" wrote:

Hi gurus

I need to make an Excel vba to write to a log text file usage of
certain buttons on a userform.

So, when user clicks a button called "button1" on "userform1" this
information should be added in the end of text file with date and
username.
There are two problems I can't solve and need you help with.
a) how to write an event to a userform so that any button clicked runs
program to save to log file.
b) how to append to the file. I have used print and write for other
purposes, but this should append and not overwrite.

This is against news rules, but could you pls send your comments to
jari.toukkari...jippii.fi because I have a limited access to news
groups.

Thanks in advance.
Jari


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 buttons to print out on pdf file and printer!! umitakkaya Excel Worksheet Functions 0 May 3rd 06 03:10 PM
Open CSV file, format data and write output to a text file. BristolBloos Excel Programming 1 October 18th 05 03:50 PM
Write Text File Nigel Excel Programming 9 March 31st 05 05:44 PM
Text file to measure file usage ExcelMonkey[_190_] Excel Programming 4 February 4th 05 01:59 PM
how to write other language in text file from VBA Ravi Excel Programming 1 January 27th 04 03:21 AM


All times are GMT +1. The time now is 06:08 AM.

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"