![]() |
|
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Join Date: Mar 2002
Location: England, UK.
Posts: 526
|
Hi.
I have this file, that is quite big. It is about 50,000 rows down in all. The columns span from A-Z. The formulas for all rows are just copied down from Row 2. Ideally it would be nice to get a macro, on opening the spreadsheet, to copy the formulas down. Also, on close it would be nice to get the macro to delete these formulas so that the file is less bulky. Also, another issue is that sometimes when I do this manually, it crashes excel which is a pain. And it takes a lot of time. Thanks in anticipation, RET79 |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Christchurch New Zealand
Posts: 1,030
|
record a macro copying those formulas down and put it in the workbook_open event
then record deleting the row and put in it the workbookbeforeclose event is that what your aafter? |
|
|
|
|
|
#3 |
|
Join Date: Mar 2002
Location: England, UK.
Posts: 526
|
brett,
yes I have already recorded such a macro. at the moment it is just assigned to a button on the spreadsheet which is not ideal. I wasn't sure where to put the macro for it to be fired whenever the workbook was being opened. (or closed for the delete one) Thanks, RET79 |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Christchurch New Zealand
Posts: 1,030
|
depends if you are going to save the workbook in that case i suppose if you only want it to delete the formulas when saving put it in the workbookbeforesave event
|
|
|
|
|
|
#5 |
|
Join Date: Mar 2002
Location: England, UK.
Posts: 526
|
Yes, before saving I want to delete these rows, and have them appear when I open the file.
Please forgive me, but I am not sure what you mean by putting them in the workbook before save place, I am a novice in this and don't know where to put it. Thanks, RET79 |
|
|
|
|
|
#6 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Christchurch New Zealand
Posts: 1,030
|
In project explorer goto this Worbook sheet put this code in
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) 'Your Code Here' End Sub then for any other events that you want just click the drop down box above that there are alot of events you can use |
|
|
|
|
|
#7 |
|
Join Date: Mar 2002
Location: England, UK.
Posts: 526
|
WOW that's cool!
Such a handy feature that. RET79 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|