Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ira ira is offline
external usenet poster
 
Posts: 1
Default How to run a Sub while opening the xls file (what event to use)?

i need to initialise some values while opening a file.

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

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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/



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
opening an excel file opens a duplicate file of the same file skm Excel Discussion (Misc queries) 1 December 7th 05 05:52 PM
Event on opening/closing groupings in VBA Dirk Flakowski Excel Discussion (Misc queries) 3 November 29th 05 03:52 PM
Stopping event during opening and saving Urban Excel Programming 0 December 11th 03 07:38 PM
Combobox Change Event when file is saved as E.Anderegg Excel Programming 1 October 1st 03 05:03 PM
VBA capture File SaveAs Event Linda Mcfarlane Excel Programming 2 September 17th 03 04:06 AM


All times are GMT +1. The time now is 02:29 PM.

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"