View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Closing workbook open as CSV

I don't recall ever having to mislead excel if I closed without saving changes.

But if it helps the original poster, woohoo!!!

Wouter HM wrote:

Hi Sam,

In addition to Dave's first sample:

'open the csv file
Workbooks.Open Filename:="somepath\somename.csv"
set csvwkbk = activeworkbook 'the csv that was just opened

'do lots of work

'mislead the workbook it is saved after changes
csvwkbk.saved = true

'and close the workbook
csvwkbk.close savechanges:=false

HTH,

Wouter


--

Dave Peterson