View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Don't save external data.

You have the advantage of knowing what you want to do. <g

--
Regards,
Tom Ogilvy


"Nick" wrote in message
oups.com...
Okay, thanks. Problem with that is that I've put other data in those
sheets that isn't from the csv file that I want to keep, and
worksheets(symbol).Cells.Clear would delete it. I've found another way
I think:

Dim rng As Range, i As Long
Dim symbol As String
Application.DisplayAlerts = False
Application.ScreenUpdating = False
i = 6
Set rng = Cells(i, 2)
Do While Application.CountA(rng.Resize(1, 15)) < 0
symbol = Cells(i, 2).Value
Sheets(symbol).Select
Application.Goto Reference:=symbol
Selection.ClearContents
Sheets("Stocks").Select
i = i + 1
Set rng = rng.Offset(1, 0)
Loop