View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
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.