Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default New to VBS and VBA

Sorry if this seems like a stupid question.

Here is what I would like to be able to do.

1. Save a worksheet within a workbook as a CSV file
There are lots of references (formulas and functions) within the
worksheet to other worksheets and I need the data only out so I can do a
final manipulation.
2. Open the CSV file and delete columns E - G
3. Delete row if column D = 0
4. Resave the file.

Is this all possible? If so, could you please guide me in the correct
direction. Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default New to VBS and VBA

Activesheet.Copy
ActiveSheet.UsedRange.Formula = Activesheet.UsedRange.Value
activeSheet.Range("E:G").Delete

for i = cells(rows.count,4).End(xlup).row to 1 step -1
if cells(i,4).Value = 0 then
cells(i,4).Entirerow.Delete
end if
Next
ActiveWorkbook.SaveAs "C:\My Files\Mybook.csv", FileFormat:=xlCSV

--
Regards,
Tom Ogilvy

"Barak" wrote in message
...
Sorry if this seems like a stupid question.

Here is what I would like to be able to do.

1. Save a worksheet within a workbook as a CSV file
There are lots of references (formulas and functions) within the
worksheet to other worksheets and I need the data only out so I can do

a
final manipulation.
2. Open the CSV file and delete columns E - G
3. Delete row if column D = 0
4. Resave the file.

Is this all possible? If so, could you please guide me in the correct
direction. 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



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