Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How do I write a macro in XL that will delete 1st row and save th.

I would like to create a macro that deletes the the first row or the first
two rows and saves the file with a new predefined name and location.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default How do I write a macro in XL that will delete 1st row and save th.


With Activeworkbook
.Worksheets("Sheet1").Rows("1:2").Delete
.SaveAs Filename:= myFile
End With

where myFile is the predefined name.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Nitin" wrote in message
...
I would like to create a macro that deletes the the first row or the first
two rows and saves the file with a new predefined name and location.



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
2007 Macro to Open File, Delete Contents, Save New File Flintstone[_2_] Excel Discussion (Misc queries) 2 February 1st 10 11:25 PM
How write Macro to save worksheet to a RELATIVE address Barry Excel Discussion (Misc queries) 10 May 1st 08 08:24 PM
how do I write a request to 'Save As' Macro CRAIG K[_2_] Excel Discussion (Misc queries) 5 March 10th 08 01:31 PM
is it possible to execute write to the fields in another .xsl form a macro in another .xsl? e.g. some way to load another .xsl into an .xsl macro and write to its data? Daniel Excel Worksheet Functions 1 June 23rd 05 11:38 PM
Need to save/write ranges to a workbook [email protected] Excel Programming 16 December 8th 04 12:12 AM


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