View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default How to run a Sub while opening the xls file (what event to use)?

You can use the Workbook open event

Check out this site about events
http://www.cpearson.com/excel/events.htm


You can use this line to insert 5 rows
Range("a1").Rows.Resize(5).EntireRow.Insert


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"ira" wrote in message ...
i need to initialise some values while opening a file.

Also how to move down the cells when pasting (not deleting them)? i
paste data to a range a1:a5 and there is already some data. i want to
move it to a6:a10 and paste new data to a1:a5. Is there any easy way to
do this while using the Paste method?


---
Message posted from http://www.ExcelForum.com/