Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel 2003
I have a form with a button that inserts one row. As soon as the Insert executes, the form closes and the code quits. i = ActiveCell.Row Rows(i + 1).Select Selection.Insert I also tried: Rows(i + 1).Insert on the last line, and no dice. Resolution: close the sheet and reopen and it works. Lesson learned: Excel sometimes works in mysterious ways. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The only way the form iwll close if there is code that does this or there is
an Error. I recommend doing two things 1) In VBA menu change the option tools - Option - General - Error trapping - Break on All Errors 2) Comment out all 'On Error" statements until you get the code working. The error trapping could be shtting down the userform. You now should be able to find the problem and fix the problem. "DFS" wrote: Excel 2003 I have a form with a button that inserts one row. As soon as the Insert executes, the form closes and the code quits. i = ActiveCell.Row Rows(i + 1).Select Selection.Insert I also tried: Rows(i + 1).Insert on the last line, and no dice. Resolution: close the sheet and reopen and it works. Lesson learned: Excel sometimes works in mysterious ways. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
change this
i = ActiveCell.Row Rows(i + 1).Select Selection.Insert TO i = ActiveCell.Row activesheet.rows(i).Insert "DFS" wrote: Excel 2003 I have a form with a button that inserts one row. As soon as the Insert executes, the form closes and the code quits. i = ActiveCell.Row Rows(i + 1).Select Selection.Insert I also tried: Rows(i + 1).Insert on the last line, and no dice. Resolution: close the sheet and reopen and it works. Lesson learned: Excel sometimes works in mysterious ways. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Insert function dialog closes when I click a picture in Excel 2007 | Excel Programming | |||
Please-please-HELP - Really need this resolved - Allocation formul | Excel Worksheet Functions | |||
when i insert word art in excel sheet excel file closes automatica | Excel Discussion (Misc queries) | |||
is it a microsoft prob..can it be resolved or not? | Excel Programming | |||
I think I found a bug and need to kow how to get it resolved | Setting up and Configuration of Excel |