Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default How to use Open as Append for log file

I've snatched the following from exceltip.com but I can't figure out
how to get the date from my sheet, which will come from two different
cells (user inputs data, results are calculated in two cells), into
this macro for appending to the log file.

I just can't figure out how it works... I think I'll need to copy the
two (or possibly more) cells to the clipboard then paste to the log
file, but I can't figure out how to do that.

To summarize with the risk of sounding repetative, I want to take two
cells in the same row and append the info to a log file.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default How to use Open as Append for log file

Something like this :

Private Sub CommandButton1_Click()
Dim FF As Long
FF = FreeFile

Open "C:\TESTFILE" For Append As #FF
Print #FF, Range("A1").Value & " & " & Range("B1").Value
Close #1

End Sub

NickHK

"mike" wrote in message
oups.com...
I've snatched the following from exceltip.com but I can't figure out
how to get the date from my sheet, which will come from two different
cells (user inputs data, results are calculated in two cells), into
this macro for appending to the log file.

I just can't figure out how it works... I think I'll need to copy the
two (or possibly more) cells to the clipboard then paste to the log
file, but I can't figure out how to do that.

To summarize with the risk of sounding repetative, I want to take two
cells in the same row and append the info to a log file.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default How to use Open as Append for log file


NickHK wrote:
Something like this :

Private Sub CommandButton1_Click()
Dim FF As Long
FF = FreeFile

Open "C:\TESTFILE" For Append As #FF
Print #FF, Range("A1").Value & " & " & Range("B1").Value
Close #1

End Sub

NickHK



Excellent. Thanks.

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
Trying to append to file using an array Susan Hayes Excel Programming 1 January 5th 06 08:55 AM
append file on e-mail Sylvian Excel Discussion (Misc queries) 0 September 7th 05 07:23 PM
open for append Mark[_17_] Excel Programming 2 May 18th 04 07:46 AM
Append to open CSV CY459 Excel Programming 1 October 17th 03 10:45 PM
open for append Marcel Jahn Excel Programming 1 July 22nd 03 10:15 PM


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